aboutsummaryrefslogtreecommitdiff
path: root/test/functional/sendheaders.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional/sendheaders.py')
-rwxr-xr-xtest/functional/sendheaders.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/test/functional/sendheaders.py b/test/functional/sendheaders.py
index e47e07fb86..fe577dc20a 100755
--- a/test/functional/sendheaders.py
+++ b/test/functional/sendheaders.py
@@ -128,7 +128,7 @@ class TestNode(NodeConnCB):
expect_headers = headers if headers != None else []
expect_inv = inv if inv != None else []
test_function = lambda: self.block_announced
- assert(wait_until(test_function, timeout=60))
+ wait_until(test_function, timeout=60, lock=mininode_lock)
with mininode_lock:
self.block_announced = False
@@ -155,12 +155,12 @@ class TestNode(NodeConnCB):
return
test_function = lambda: "getdata" in self.last_message and [x.hash for x in self.last_message["getdata"].inv] == hash_list
- assert(wait_until(test_function, timeout=timeout))
+ wait_until(test_function, timeout=timeout, lock=mininode_lock)
return
def wait_for_block_announcement(self, block_hash, timeout=60):
test_function = lambda: self.last_blockhash_announced == block_hash
- assert(wait_until(test_function, timeout=timeout))
+ wait_until(test_function, timeout=timeout, lock=mininode_lock)
return
def send_header_for_blocks(self, new_blocks):
@@ -174,8 +174,7 @@ class TestNode(NodeConnCB):
self.send_message(getblocks_message)
class SendHeadersTest(BitcoinTestFramework):
- def __init__(self):
- super().__init__()
+ def set_test_params(self):
self.setup_clean_chain = True
self.num_nodes = 2