Skip to content

Commit fa1cd9e

Browse files
author
MarcoFalke
committed
test: Remove unused lock arg from BitcoinTestFramework.wait_until
1 parent fad2794 commit fa1cd9e

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

test/functional/p2p_leak.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
msg_ping,
1818
msg_version,
1919
)
20-
from test_framework.p2p import p2p_lock, P2PInterface
20+
from test_framework.p2p import P2PInterface
2121
from test_framework.test_framework import BitcoinTestFramework
2222
from test_framework.util import (
2323
assert_equal,
@@ -113,9 +113,9 @@ def run_test(self):
113113
# verack, since we never sent one
114114
no_verack_idle_peer.wait_for_verack()
115115

116-
self.wait_until(lambda: no_version_disconnect_peer.ever_connected, timeout=10, lock=p2p_lock)
117-
self.wait_until(lambda: no_version_idle_peer.ever_connected, timeout=10, lock=p2p_lock)
118-
self.wait_until(lambda: no_verack_idle_peer.version_received, timeout=10, lock=p2p_lock)
116+
no_version_disconnect_peer.wait_until(lambda: no_version_disconnect_peer.ever_connected, check_connected=False)
117+
no_version_idle_peer.wait_until(lambda: no_version_idle_peer.ever_connected)
118+
no_verack_idle_peer.wait_until(lambda: no_verack_idle_peer.version_received)
119119

120120
# Mine a block and make sure that it's not sent to the connected peers
121121
self.nodes[0].generate(nblocks=1)

test/functional/test_framework/test_framework.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -603,8 +603,8 @@ def sync_all(self, nodes=None):
603603
self.sync_blocks(nodes)
604604
self.sync_mempools(nodes)
605605

606-
def wait_until(self, test_function, timeout=60, lock=None):
607-
return wait_until_helper(test_function, timeout=timeout, lock=lock, timeout_factor=self.options.timeout_factor)
606+
def wait_until(self, test_function, timeout=60):
607+
return wait_until_helper(test_function, timeout=timeout, timeout_factor=self.options.timeout_factor)
608608

609609
# Private helper methods. These should not be accessed by the subclass test scripts.
610610

0 commit comments

Comments
 (0)