Browse files

[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: 55bfddc
  • Loading branch information...
1 parent 2ba5d78 commit 286e548d87266f3b394d75182f04fb701b2263e8 @ryanofsky ryanofsky committed with MarcoFalke Oct 26, 2016
Showing with 2 additions and 0 deletions.
  1. +2 −0 qa/rpc-tests/
@@ -651,6 +651,8 @@ def test_compactblocks_not_at_tip(self, node, test_node):
wait_until(test_node.received_block_announcement, timeout=30)
+ 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)

0 comments on commit 286e548

Please sign in to comment.