Skip to content

Commit

Permalink
Merge bitcoin#8854: [qa] Fix race condition in p2p-compactblocks test
Browse files Browse the repository at this point in the history
b5fd666 [qa] Fix race condition in p2p-compactblocks test (Suhas Daftuar)
  • Loading branch information
MarcoFalke committed Oct 1, 2016
2 parents 7b784cc + b5fd666 commit 6faffb8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions qa/rpc-tests/p2p-compactblocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,8 @@ def test_compactblock_construction(self):
for i in range(num_transactions):
self.nodes[0].sendtoaddress(address, 0.1)

self.test_node.sync_with_ping()

# Now mine a block, and look at the resulting compact block.
self.test_node.clear_block_announcement()
block_hash = int(self.nodes[0].generate(1)[0], 16)
Expand Down
2 changes: 1 addition & 1 deletion qa/rpc-tests/test_framework/mininode.py
Original file line number Diff line number Diff line change
Expand Up @@ -1536,7 +1536,7 @@ def sync_with_ping(self, timeout=30):
def received_pong():
return (self.last_pong.nonce == self.ping_counter)
self.send_message(msg_ping(nonce=self.ping_counter))
success = wait_until(received_pong, timeout)
success = wait_until(received_pong, timeout=timeout)
self.ping_counter += 1
return success

Expand Down

0 comments on commit 6faffb8

Please sign in to comment.