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:
fanquake 2023-03-10 14:25:58 +01:00 committed by pasta
parent be2e16f33a
commit 2a39b93233
No known key found for this signature in database
GPG Key ID: E2F3D7916E722D38

View File

@ -505,7 +505,7 @@ class P2PInterface(P2PConnection):
def wait_for_connect(self, timeout=60): def wait_for_connect(self, timeout=60):
test_function = lambda: self.is_connected 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): def wait_for_disconnect(self, timeout=60):
test_function = lambda: not self.is_connected test_function = lambda: not self.is_connected