Skip to content

Commit 6faffb8

Browse files
author
MarcoFalke
committed
Merge #8854: [qa] Fix race condition in p2p-compactblocks test
b5fd666 [qa] Fix race condition in p2p-compactblocks test (Suhas Daftuar)
2 parents 7b784cc + b5fd666 commit 6faffb8

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

qa/rpc-tests/p2p-compactblocks.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,8 @@ def test_compactblock_construction(self):
237237
for i in range(num_transactions):
238238
self.nodes[0].sendtoaddress(address, 0.1)
239239

240+
self.test_node.sync_with_ping()
241+
240242
# Now mine a block, and look at the resulting compact block.
241243
self.test_node.clear_block_announcement()
242244
block_hash = int(self.nodes[0].generate(1)[0], 16)

qa/rpc-tests/test_framework/mininode.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1536,7 +1536,7 @@ def sync_with_ping(self, timeout=30):
15361536
def received_pong():
15371537
return (self.last_pong.nonce == self.ping_counter)
15381538
self.send_message(msg_ping(nonce=self.ping_counter))
1539-
success = wait_until(received_pong, timeout)
1539+
success = wait_until(received_pong, timeout=timeout)
15401540
self.ping_counter += 1
15411541
return success
15421542

0 commit comments

Comments
 (0)