mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-02-04 06:12:07 +01:00
test: fix intermittent failure in p2p_sendtxrcncl.py
Using disconnect_p2ps instead of peer_disconnect makes the node wait for the disconnect to complete. As a result, we can reuse p2p_idx=0 in the add_outbound_p2p_connection calls.
This commit is contained in:
@@ -625,6 +625,10 @@ class TestNode():
|
||||
|
||||
This method adds the p2p connection to the self.p2ps list and returns
|
||||
the connection to the caller.
|
||||
|
||||
p2p_idx must be different for simultaneously connected peers. When reusing it for the next peer
|
||||
after disconnecting the previous one, it is necessary to wait for the disconnect to finish to avoid
|
||||
a race condition.
|
||||
"""
|
||||
|
||||
def addconnection_callback(address, port):
|
||||
|
||||
Reference in New Issue
Block a user