diff options
author | Vasil Dimov <vd@FreeBSD.org> | 2023-05-24 08:34:57 +0200 |
---|---|---|
committer | Vasil Dimov <vd@FreeBSD.org> | 2024-10-22 13:03:11 +0200 |
commit | 22cd0e888c71b0f56171a524251c1557bcb6237b (patch) | |
tree | 0eb58bde875d64d48f9a46bf102b58be40696a76 /test | |
parent | ebe42c00aa4a7a16900eff3aec45604c86b2dbf5 (diff) |
test: support WTX INVs from P2PDataStore and fix a comment
Diffstat (limited to 'test')
-rwxr-xr-x | test/functional/test_framework/p2p.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/test/functional/test_framework/p2p.py b/test/functional/test_framework/p2p.py index adabbcf22f..9b791180c3 100755 --- a/test/functional/test_framework/p2p.py +++ b/test/functional/test_framework/p2p.py @@ -808,12 +808,13 @@ class P2PDataStore(P2PInterface): self.getdata_requests = [] def on_getdata(self, message): - """Check for the tx/block in our stores and if found, reply with an inv message.""" + """Check for the tx/block in our stores and if found, reply with MSG_TX or MSG_BLOCK.""" for inv in message.inv: self.getdata_requests.append(inv.hash) - if (inv.type & MSG_TYPE_MASK) == MSG_TX and inv.hash in self.tx_store.keys(): + invtype = inv.type & MSG_TYPE_MASK + if (invtype == MSG_TX or invtype == MSG_WTX) and inv.hash in self.tx_store.keys(): self.send_message(msg_tx(self.tx_store[inv.hash])) - elif (inv.type & MSG_TYPE_MASK) == MSG_BLOCK and inv.hash in self.block_store.keys(): + elif invtype == MSG_BLOCK and inv.hash in self.block_store.keys(): self.send_message(msg_block(self.block_store[inv.hash])) else: logger.debug('getdata message type {} received.'.format(hex(inv.type))) |