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:
1 parent
5274f32437
commit
74d975318a
2 files changed
+19
-15
No files matched your search
@@ -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