Skip to content

Commit c2da8c5

Browse files
committed
Merge bitcoin#28822: test: Add missing wait for version to be sent in add_outbound_p2p_connection
faa2ad8 test: Add missing wait for version to be sent in add_outbound_p2p_connection (MarcoFalke) Pull request description: Can be tested with: ```diff diff --git a/test/functional/test_framework/p2p.py b/test/functional/test_framework/p2p.py index b1ed97b..eb4f72c6b6 100755 --- a/test/functional/test_framework/p2p.py +++ b/test/functional/test_framework/p2p.py @@ -205,6 +205,7 @@ class P2PConnection(asyncio.Protocol): assert not self._transport logger.debug("Connected & Listening: %s:%d" % (self.dstaddr, self.dstport)) self._transport = transport + import time;time.sleep(.1); if self.on_connection_send_msg: self.send_message(self.on_connection_send_msg) self.on_connection_send_msg = None # Never used again ``` Found and reported by mzumsande in bitcoin#28782 (review) ACKs for top commit: mzumsande: ACK faa2ad8 Tree-SHA512: 863f06125dec40cccaa852d0d8ca2e2b9c0b74610205e9fd6c9c279bdf36801ff475e3d873fd1b18172eb8220e17b2caff60069ce63512e569934a43f27d03fd
2 parents d60ebea + faa2ad8 commit c2da8c5

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

test/functional/test_framework/test_node.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -703,6 +703,7 @@ def addconnection_callback(address, port):
703703
p2p_conn.wait_for_connect()
704704
self.p2ps.append(p2p_conn)
705705

706+
p2p_conn.wait_until(lambda: not p2p_conn.on_connection_send_msg)
706707
if wait_for_verack:
707708
p2p_conn.wait_for_verack()
708709
p2p_conn.sync_with_ping()

0 commit comments

Comments
 (0)