Skip to content

Commit 0294205

Browse files
committed
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.
1 parent 57d611e commit 0294205

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

test/functional/p2p_orphan_handling.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -788,6 +788,7 @@ def test_parents_change(self):
788788

789789
# Disconnect peer1. peer2 should become the new candidate for orphan resolution.
790790
peer1.peer_disconnect()
791+
self.wait_until(lambda: node.num_test_p2p_connections() == 1)
791792
node.bumpmocktime(TXREQUEST_TIME_SKIP)
792793
self.wait_until(lambda: len(node.getorphantxs(verbosity=2)[0]["from"]) == 1)
793794
# Both parents should be requested, now that they are both missing.

0 commit comments

Comments
 (0)