Skip to content

Commit 55bfddc

Browse files
committed
[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.
1 parent 47e9659 commit 55bfddc

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

qa/rpc-tests/p2p-compactblocks.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -648,6 +648,8 @@ def test_compactblocks_not_at_tip(self, node, test_node):
648648
node.generate(1)
649649
wait_until(test_node.received_block_announcement, timeout=30)
650650
test_node.clear_block_announcement()
651+
with mininode_lock:
652+
test_node.last_block = None
651653
test_node.send_message(msg_getdata([CInv(4, int(new_blocks[0], 16))]))
652654
success = wait_until(lambda: test_node.last_block is not None, timeout=30)
653655
assert(success)

0 commit comments

Comments
 (0)