mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-29 07:18:58 +01:00
test: Fix intermittent failure in rpc_net.py
The wait in disconnect_p2ps checked for subver, which is unavailable for the peer that didn't send a version msg.
This commit is contained in:
@@ -656,7 +656,8 @@ class TestNode():
|
||||
return len([peer for peer in self.getpeerinfo() if peer['subver'] == P2P_SUBVERSION])
|
||||
|
||||
def disconnect_p2ps(self):
|
||||
"""Close all p2p connections to the node."""
|
||||
"""Close all p2p connections to the node.
|
||||
Use only after each p2p has sent a version message to ensure the wait works."""
|
||||
for p in self.p2ps:
|
||||
p.peer_disconnect()
|
||||
del self.p2ps[:]
|
||||
|
||||
Reference in New Issue
Block a user