Changeset View
Changeset View
Standalone View
Standalone View
test/functional/test_framework/p2p.py
Show First 20 Lines • Show All 525 Lines • ▼ Show 20 Lines | def wait_until(self, test_function_in, *, timeout=60, | ||||
assert self.is_connected | assert self.is_connected | ||||
return test_function_in() | return test_function_in() | ||||
wait_until_helper(test_function, timeout=timeout, lock=p2p_lock, | wait_until_helper(test_function, timeout=timeout, lock=p2p_lock, | ||||
timeout_factor=self.timeout_factor) | timeout_factor=self.timeout_factor) | ||||
def wait_for_connect(self, timeout=60): | def wait_for_connect(self, timeout=60): | ||||
def test_function(): return self.is_connected | def test_function(): return self.is_connected | ||||
wait_until_helper(test_function, timeout=timeout, lock=p2p_lock) | self.wait_until(test_function, timeout=timeout, check_connected=False) | ||||
def wait_for_disconnect(self, timeout=60): | def wait_for_disconnect(self, timeout=60): | ||||
def test_function(): return not self.is_connected | def test_function(): return not self.is_connected | ||||
self.wait_until(test_function, timeout=timeout, check_connected=False) | self.wait_until(test_function, timeout=timeout, check_connected=False) | ||||
# Message receiving helper methods | # Message receiving helper methods | ||||
def wait_for_tx(self, txid, timeout=60): | def wait_for_tx(self, txid, timeout=60): | ||||
▲ Show 20 Lines • Show All 358 Lines • Show Last 20 Lines |