mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-06-22 14:52:41 +02:00
Merge bitcoin/bitcoin#27226: test: Use self.wait_until over wait_until_helper
faa671591f9c83ef0fb5afea151a1907c28f024b test: Use self.wait_until over wait_until_helper (MarcoFalke) Pull request description: `wait_until_helper` is a "private" helper, not intended to be used directly, because it doesn't scale the timeout with the timeout factor. Fix this by replacing it with a call to `self.wait_until`, which does the scaling. ACKs for top commit: theStack: Code-review ACK faa671591f9c83ef0fb5afea151a1907c28f024b Tree-SHA512: 70705f309f83ffd6ea5d090218195d05b868624d909106863372f861138b5a70887070b25beb25044ae1b44250345e45c9cc11191ae7aeca2ad37801a0f62f61
This commit is contained in:
commit
6f5eb7a39e
@ -464,7 +464,7 @@ class P2PInterface(P2PConnection):
|
||||
|
||||
def wait_for_connect(self, timeout=60):
|
||||
test_function = lambda: 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):
|
||||
test_function = lambda: not self.is_connected
|
||||
|
Loading…
x
Reference in New Issue
Block a user