MCPcopy Create free account
hub / github.com/bitcoin/bitcoin / wait_until

Method wait_until

test/functional/test_framework/p2p.py:604–610  ·  view source on GitHub ↗
(self, test_function_in, *, timeout=60, check_connected=True, check_interval=0.05)

Source from the content-addressed store, hash-verified

602 # Connection helper methods
603
604 def wait_until(self, test_function_in, *, timeout=60, check_connected=True, check_interval=0.05):
605 def test_function():
606 if check_connected:
607 assert self.is_connected
608 return test_function_in()
609
610 wait_until_helper_internal(test_function, timeout=timeout, lock=p2p_lock, timeout_factor=self.timeout_factor, check_interval=check_interval)
611
612 def wait_for_connect(self, *, timeout=60):
613 test_function = lambda: self.is_connected

Callers 15

wait_for_connectMethod · 0.95
wait_for_disconnectMethod · 0.95
wait_for_reconnectMethod · 0.95
wait_for_txMethod · 0.95
wait_for_blockMethod · 0.95
wait_for_headerMethod · 0.95
wait_for_merkleblockMethod · 0.95
wait_for_getdataMethod · 0.95
wait_for_getheadersMethod · 0.95
wait_for_invMethod · 0.95
wait_for_verackMethod · 0.95
sync_with_pingMethod · 0.95

Calls 1

Tested by 15

test_nonnull_locatorsMethod · 0.36
test_getpeerinfoMethod · 0.36
test_getnettotalsMethod · 0.36
test_getnetworkinfoMethod · 0.36
test_sendmsgtopeerMethod · 0.36
test_tx_in_blockMethod · 0.36
test_height_minMethod · 0.36