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

@@ -34,13 +34,13 @@ from test_framework.wallet import MiniWallet
class SlowP2PDataStore(P2PDataStore):
def on_ping(self, message):
time.sleep(0.1)
self.send_message(msg_pong(message.nonce))
self.send_without_ping(msg_pong(message.nonce))
class SlowP2PInterface(P2PInterface):
def on_ping(self, message):
time.sleep(0.1)
self.send_message(msg_pong(message.nonce))
self.send_without_ping(msg_pong(message.nonce))
class P2PEvict(BitcoinTestFramework):
@@ -82,7 +82,7 @@ class P2PEvict(BitcoinTestFramework):
txpeer.sync_with_ping()
tx = self.wallet.create_self_transfer()['tx']
txpeer.send_message(msg_tx(tx))
txpeer.send_without_ping(msg_tx(tx))
protected_peers.add(current_peer)
self.log.info("Create 8 peers and protect them from eviction by having faster pings")