mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-25 02:33:24 -03:00
Merge bitcoin/bitcoin#29511: test: Fix intermittent failure in rpc_net.py --v2transport
0487f91a20
test: Fix intermittent failure in rpc_net.py --v2transport (stratospher) Pull request description: Fixes #29508. Make sure that v2 handshake is complete before comparing getpeerinfo outputs so that `transport_protocol_type` isn't stuck at 'detecting'. This is done by adding a wait_until statement till `transport_protocol_type = v2` so that bitcoind waits until the v2 handshake is complete. (on the python side, this is ensured by default since `wait_for_handshake = True` inside `add_p2p_connection()`) ACKs for top commit: Sjors: ACK0487f91a20
mzumsande: Code Review ACK0487f91a20
achow101: ACK0487f91a20
vasild: ACK0487f91a20
Tree-SHA512: 44dd646a61cd38da243f527df7321e22d1821c2b090be43673027746098caf450c6671708ed731ba257952df6b5886e64c9c2f9686a82f6ef0f25780b7a87d3d
This commit is contained in:
commit
61aa981b8c
1 changed files with 2 additions and 0 deletions
|
@ -113,6 +113,8 @@ class NetTest(BitcoinTestFramework):
|
|||
self.nodes[0].setmocktime(no_version_peer_conntime)
|
||||
with self.nodes[0].wait_for_new_peer():
|
||||
no_version_peer = self.nodes[0].add_p2p_connection(P2PInterface(), send_version=False, wait_for_verack=False)
|
||||
if self.options.v2transport:
|
||||
self.wait_until(lambda: self.nodes[0].getpeerinfo()[no_version_peer_id]["transport_protocol_type"] == "v2")
|
||||
self.nodes[0].setmocktime(0)
|
||||
peer_info = self.nodes[0].getpeerinfo()[no_version_peer_id]
|
||||
peer_info.pop("addr")
|
||||
|
|
Loading…
Add table
Reference in a new issue