diff options
author | MarcoFalke <falke.marco@gmail.com> | 2018-10-27 07:17:59 -0400 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2018-10-27 07:18:06 -0400 |
commit | c70f9c0cfc9c4a5559d3f91f29b9541f7f737753 (patch) | |
tree | eeb726e21675d27c7eabf60cf09ac51aee2d3954 /test/functional/test_framework/messages.py | |
parent | f4e4ea1ceecfb978584bd4f43cb6826e44ba86a3 (diff) | |
parent | fa78a2fc670d7162d6ba6d432188da6d6e5288ac (diff) |
Merge #14571: [tests] Test that nodes respond to getdata with notfound
fa78a2fc67 [tests] Test that nodes respond to getdata with notfound (MarcoFalke)
Pull request description:
If a node has not announced a tx at all, then it should respond to
getdata messages for that tx with notfound, to avoid leaking tx
origination privacy.
In the future this could be adjusted such that a node responds with
notfound when a tx has not been announced to us, but that seems
to be a more involved change. See e.g.
https://github.com/jnewbery/bitcoin/commits/pr14220.1
Tree-SHA512: 6244afa5bd5d8fec9b89dfc02c9958bc370195145a0f3715f33200d6cf73a376c94193d44bf4523867196e6591c53ede8f9b6a77cb296b48c114a117b8c8b1fa
Diffstat (limited to 'test/functional/test_framework/messages.py')
-rwxr-xr-x | test/functional/test_framework/messages.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/functional/test_framework/messages.py b/test/functional/test_framework/messages.py index 8e9372767d..92acbb9a09 100755 --- a/test/functional/test_framework/messages.py +++ b/test/functional/test_framework/messages.py @@ -1232,6 +1232,23 @@ class msg_mempool: return "msg_mempool()" +class msg_notfound: + __slots__ = ("vec", ) + command = b"notfound" + + def __init__(self, vec=None): + self.vec = vec or [] + + def deserialize(self, f): + self.vec = deser_vector(f, CInv) + + def serialize(self): + return ser_vector(self.vec) + + def __repr__(self): + return "msg_notfound(vec=%s)" % (repr(self.vec)) + + class msg_sendheaders: __slots__ = () command = b"sendheaders" |