mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-04-29 14:59:39 -04:00
test: fix intermittent failure in p2p_orphan_handling.py
If we bump the mocktime before the node has successfully disconnected
the peer, the requests for both parents could be spread over
two GETDATAS, which would make the test fail.
Github-Pull: #32063
Rebased-From: 02942056fd
This commit is contained in:
parent
458655bca8
commit
5ebcb59fdb
1 changed files with 1 additions and 0 deletions
|
@ -788,6 +788,7 @@ class OrphanHandlingTest(BitcoinTestFramework):
|
||||||
|
|
||||||
# Disconnect peer1. peer2 should become the new candidate for orphan resolution.
|
# Disconnect peer1. peer2 should become the new candidate for orphan resolution.
|
||||||
peer1.peer_disconnect()
|
peer1.peer_disconnect()
|
||||||
|
self.wait_until(lambda: node.num_test_p2p_connections() == 1)
|
||||||
node.bumpmocktime(TXREQUEST_TIME_SKIP)
|
node.bumpmocktime(TXREQUEST_TIME_SKIP)
|
||||||
self.wait_until(lambda: len(node.getorphantxs(verbosity=2)[0]["from"]) == 1)
|
self.wait_until(lambda: len(node.getorphantxs(verbosity=2)[0]["from"]) == 1)
|
||||||
# Both parents should be requested, now that they are both missing.
|
# Both parents should be requested, now that they are both missing.
|
||||||
|
|
Loading…
Add table
Reference in a new issue