aboutsummaryrefslogtreecommitdiff
path: root/qa/rpc-tests
diff options
context:
space:
mode:
authorRussell Yanofsky <russ@chaincode.com>2016-10-26 14:15:16 -0400
committerMarcoFalke <falke.marco@gmail.com>2016-11-19 23:55:07 +0100
commit286e548d87266f3b394d75182f04fb701b2263e8 (patch)
treec6c1e30b3735cd02c1a55242360e8308b530604e /qa/rpc-tests
parent2ba5d784276783716bbf27b458514c4c3f44f4b6 (diff)
downloadbitcoin-286e548d87266f3b394d75182f04fb701b2263e8.tar.xz
[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. Github-Pull: #9058 Rebased-From: 55bfddcabbf9e8a3743f77167ba4a43aaba9f948
Diffstat (limited to 'qa/rpc-tests')
-rwxr-xr-xqa/rpc-tests/p2p-compactblocks.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/qa/rpc-tests/p2p-compactblocks.py b/qa/rpc-tests/p2p-compactblocks.py
index 0abb9f9869..249afec2b5 100755
--- a/qa/rpc-tests/p2p-compactblocks.py
+++ b/qa/rpc-tests/p2p-compactblocks.py
@@ -651,6 +651,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)