mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-02-03 22:03:01 +01:00
[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: 55bfddcabb
This commit is contained in:
committed by
MarcoFalke
parent
2ba5d78427
commit
286e548d87
@@ -651,6 +651,8 @@ class CompactBlocksTest(BitcoinTestFramework):
|
|||||||
node.generate(1)
|
node.generate(1)
|
||||||
wait_until(test_node.received_block_announcement, timeout=30)
|
wait_until(test_node.received_block_announcement, timeout=30)
|
||||||
test_node.clear_block_announcement()
|
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))]))
|
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)
|
success = wait_until(lambda: test_node.last_block is not None, timeout=30)
|
||||||
assert(success)
|
assert(success)
|
||||||
|
|||||||
Reference in New Issue
Block a user