mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-05 11:16:24 +00:00
Merge bitcoin/bitcoin#32063: test: fix intermittent failure in p2p_orphan_handling.py
02942056fd861581503a8a35a06dcf22d4ba1473 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 #31700
ACKs for top commit:
maflcko:
lgtm ACK 02942056fd861581503a8a35a06dcf22d4ba1473
instagibbs:
ACK 02942056fd
Tree-SHA512: 769200898345da197d86d673d9506f08f0a64b72a456e7e7c988ac37450d9c54ec65da1c8447c566c8578f7cfccdc5723ea680e636bfbe0b3d38265e5ef57774
This commit is contained in:
commit
70a0ee89c6
@ -788,6 +788,7 @@ class OrphanHandlingTest(BitcoinTestFramework):
|
||||
|
||||
# Disconnect peer1. peer2 should become the new candidate for orphan resolution.
|
||||
peer1.peer_disconnect()
|
||||
self.wait_until(lambda: node.num_test_p2p_connections() == 1)
|
||||
node.bumpmocktime(TXREQUEST_TIME_SKIP)
|
||||
self.wait_until(lambda: len(node.getorphantxs(verbosity=2)[0]["from"]) == 1)
|
||||
# Both parents should be requested, now that they are both missing.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user