mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-29 18:05:58 +02:00
Merge bitcoin/bitcoin#32092: test: Fix intermittent issue in p2p_orphan_handling.py
fa310cc6f4test: Fix intermittent issue in p2p_orphan_handling.py (MarcoFalke) Pull request description: The test may fail intermittently when the `net` thread is lagging while calling `DeleteNode`. This may result in a split `getdata`, meaning that `peer2.wait_for_parent_requests([int(parent_peekaboo_AB["txid"], 16), int(parent_missing["txid"], 16)])` fails. Fix it by adding a sync on the `net` thread. Fixes #31700 ACKs for top commit: mzumsande: Code Review ACKfa310cc6f4Tree-SHA512: e4a58093ab5b9e280c479b845fecb5d228e65519ea3dc2111b393202225fd0feded423e8812452454b6b9348cb37a9c1b01b9d1b1802e9f4aa76b9e56b4b54ef
This commit is contained in:
@@ -826,7 +826,8 @@ class TestNode():
|
||||
|
||||
def disconnect_p2ps(self):
|
||||
"""Close all p2p connections to the node.
|
||||
Use only after each p2p has sent a version message to ensure the wait works."""
|
||||
The state of the peers (such as txrequests) may not be fully cleared
|
||||
yet, even after this method returns."""
|
||||
for p in self.p2ps:
|
||||
p.peer_disconnect()
|
||||
del self.p2ps[:]
|
||||
|
||||
Reference in New Issue
Block a user