diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2016-11-21 15:35:53 +0100 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2016-11-21 15:41:32 +0100 |
commit | 0c577f2638b7f701e4b4b96c4c8df39dc097cf2f (patch) | |
tree | 895baa32b86a03dd0649be5b7139640233c6b971 /qa/rpc-tests/p2p-compactblocks.py | |
parent | 210891143ba000708989aa64903c8d3c383e04e1 (diff) | |
parent | 037159cebf1eae4445050cec029986514ed4e9e2 (diff) | |
download | bitcoin-0c577f2638b7f701e4b4b96c4c8df39dc097cf2f.tar.xz |
Merge #8872: Remove block-request logic from INV message processing
037159c Remove block-request logic from INV message processing (Matt Corallo)
3451203 [qa] Respond to getheaders and do not assume a getdata on inv (Matt Corallo)
d768f15 [qa] Make comptool push blocks instead of relying on inv-fetch (mrbandrews)
Diffstat (limited to 'qa/rpc-tests/p2p-compactblocks.py')
-rwxr-xr-x | qa/rpc-tests/p2p-compactblocks.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/qa/rpc-tests/p2p-compactblocks.py b/qa/rpc-tests/p2p-compactblocks.py index e0b72e6840..ab4b809ded 100755 --- a/qa/rpc-tests/p2p-compactblocks.py +++ b/qa/rpc-tests/p2p-compactblocks.py @@ -27,6 +27,7 @@ class TestNode(SingleNodeConnCB): self.last_cmpctblock = None self.block_announced = False self.last_getdata = None + self.last_getheaders = None self.last_getblocktxn = None self.last_block = None self.last_blocktxn = None @@ -64,6 +65,9 @@ class TestNode(SingleNodeConnCB): def on_getdata(self, conn, message): self.last_getdata = message + def on_getheaders(self, conn, message): + self.last_getheaders = message + def on_getblocktxn(self, conn, message): self.last_getblocktxn = message @@ -396,6 +400,9 @@ class CompactBlocksTest(BitcoinTestFramework): if announce == "inv": test_node.send_message(msg_inv([CInv(2, block.sha256)])) + success = wait_until(lambda: test_node.last_getheaders is not None, timeout=30) + assert(success) + test_node.send_header_for_blocks([block]) else: test_node.send_header_for_blocks([block]) success = wait_until(lambda: test_node.last_getdata is not None, timeout=30) |