MCPcopy Create free account
hub / github.com/ElementsProject/elements / sync_with_ping

Method sync_with_ping

test/functional/test_framework/p2p.py:554–562  ·  view source on GitHub ↗

Ensure ProcessMessages is called on this connection

(self, timeout=60)

Source from the content-addressed store, hash-verified

552 self.sync_with_ping()
553
554 def sync_with_ping(self, timeout=60):
555 """Ensure ProcessMessages is called on this connection"""
556 self.send_message(msg_ping(nonce=self.ping_counter))
557
558 def test_function():
559 return self.last_message.get("pong") and self.last_message["pong"].nonce == self.ping_counter
560
561 self.wait_until(test_function, timeout=timeout)
562 self.ping_counter += 1
563
564
565# One lock for synchronizing all data access between the network event loop (see

Callers 15

send_and_pingMethod · 0.95
sync_send_with_pingMethod · 0.95
test_null_locatorsMethod · 0.45
test_nonnull_locatorsMethod · 0.45
run_testMethod · 0.45
run_testMethod · 0.45
run_testMethod · 0.45
run_testMethod · 0.45
run_testMethod · 0.45
test_bufferMethod · 0.45
test_checksumMethod · 0.45
test_msgtypeMethod · 0.45

Calls 3

wait_untilMethod · 0.95
msg_pingClass · 0.90
send_messageMethod · 0.45

Tested by 15

test_null_locatorsMethod · 0.36
test_nonnull_locatorsMethod · 0.36
test_bufferMethod · 0.36
test_checksumMethod · 0.36
test_msgtypeMethod · 0.36
test_addrv2Method · 0.36
test_in_flight_maxMethod · 0.36
test_preferred_invMethod · 0.36
test_txid_inv_delayMethod · 0.36
test_large_inv_batchMethod · 0.36
test_frelay_falseMethod · 0.36