mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-06 19:23:41 +02:00
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:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user