diff options
| author | Russell Yanofsky <[email protected]> | 2016-10-26 14:15:16 -0400 |
|---|---|---|
| committer | Russell Yanofsky <[email protected]> | 2016-11-02 15:35:11 -0400 |
| commit | 55bfddcabbf9e8a3743f77167ba4a43aaba9f948 (patch) | |
| tree | d3d5a521cb764a4e222ff2d517613779198ba220 | |
| parent | [qa] Fix bug in compactblocks v2 merge (diff) | |
| download | discoin-55bfddcabbf9e8a3743f77167ba4a43aaba9f948.tar.xz discoin-55bfddcabbf9e8a3743f77167ba4a43aaba9f948.zip | |
[qa] Fix stale data bug in test_compactblocks_not_at_tip
Clear test_node.last_block before requesting blocks in the
compactblocks_not_at_tip test so comparisons won't fail if a blocks were received
before the test started.
The bug doesn't currently cause any problems due to the order tests run, but
this will change in the next commit.
| -rwxr-xr-x | qa/rpc-tests/p2p-compactblocks.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/qa/rpc-tests/p2p-compactblocks.py b/qa/rpc-tests/p2p-compactblocks.py index 8a5f589d0..4b49dad03 100755 --- a/qa/rpc-tests/p2p-compactblocks.py +++ b/qa/rpc-tests/p2p-compactblocks.py @@ -648,6 +648,8 @@ class CompactBlocksTest(BitcoinTestFramework): node.generate(1) wait_until(test_node.received_block_announcement, timeout=30) test_node.clear_block_announcement() + with mininode_lock: + test_node.last_block = None test_node.send_message(msg_getdata([CInv(4, int(new_blocks[0], 16))])) success = wait_until(lambda: test_node.last_block is not None, timeout=30) assert(success) |