mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 12:02:48 +01:00
[qa] Fix race condition in p2p-compactblocks test
Also fix a bug in the sync_with_ping() helper function
This commit is contained in:
parent
08cc5fd666
commit
b5fd666984
@ -237,6 +237,8 @@ class CompactBlocksTest(BitcoinTestFramework):
|
||||
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)
|
||||
|
@ -1536,7 +1536,7 @@ class SingleNodeConnCB(NodeConnCB):
|
||||
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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user