scripted-diff: test: Rename send_message to send_without_ping

send_message only drops the bytes in a buffer and a sync is needed to
avoid intermittent test issues. Change the name of the method to make
this more apparent during review.

-BEGIN VERIFY SCRIPT-
 sed -i 's/send_message(/send_without_ping(/g' $( git grep -l 'send_message(' )
-END VERIFY SCRIPT-
This commit is contained in:
MarcoFalke
2025-02-13 16:22:24 +01:00
parent fa4356717d
commit fa9cf38ab6
35 changed files with 145 additions and 145 deletions

View File

@ -84,8 +84,8 @@ class NoVerackIdlePeer(LazyPeer):
# list!
def on_version(self, message):
self.version_received = True
self.send_message(msg_ping())
self.send_message(msg_getaddr())
self.send_without_ping(msg_ping())
self.send_without_ping(msg_getaddr())
class P2PVersionStore(P2PInterface):
@ -121,7 +121,7 @@ class P2PLeakTest(BitcoinTestFramework):
# Pre-wtxidRelay peer that sends a version but not a verack and does not support feature negotiation
# messages which start at nVersion == 70016
pre_wtxidrelay_peer = self.nodes[0].add_p2p_connection(NoVerackIdlePeer(), send_version=False, wait_for_verack=False)
pre_wtxidrelay_peer.send_message(self.create_old_version(70015))
pre_wtxidrelay_peer.send_without_ping(self.create_old_version(70015))
# Wait until the peer gets the verack in response to the version. Though, don't wait for the node to receive the
# verack, since the peer never sent one
@ -173,7 +173,7 @@ class P2PLeakTest(BitcoinTestFramework):
self.log.info('Check that old peers are disconnected')
p2p_old_peer = self.nodes[0].add_p2p_connection(P2PInterface(), send_version=False, wait_for_verack=False)
with self.nodes[0].assert_debug_log(["using obsolete version 31799, disconnecting peer=5"]):
p2p_old_peer.send_message(self.create_old_version(31799))
p2p_old_peer.send_without_ping(self.create_old_version(31799))
p2p_old_peer.wait_for_disconnect()