Skip to content

Commit 70a0ee8

Browse files
committed
Merge bitcoin#32063: test: fix intermittent failure in p2p_orphan_handling.py
0294205 test: fix intermittent failure in p2p_orphan_handling.py (Martin Zumsande) Pull request description: If the mocktime is bumped before the node has successfully disconnected the peer, the requests for both parents could be spread over two GETDATAS: The first time `GetRequestsToSend` is invoked it would only request one tx from peer2, because the other one would only be available after peer1 was disconnected and its outstanding txrequest cleared. So two GETDATAs would be sent, which would make the test fail. Fixes bitcoin#31700 ACKs for top commit: maflcko: lgtm ACK 0294205 instagibbs: ACK bitcoin@0294205 Tree-SHA512: 769200898345da197d86d673d9506f08f0a64b72a456e7e7c988ac37450d9c54ec65da1c8447c566c8578f7cfccdc5723ea680e636bfbe0b3d38265e5ef57774
2 parents 83a9e55 + 0294205 commit 70a0ee8

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

test/functional/p2p_orphan_handling.py

+1
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)