aboutsummaryrefslogtreecommitdiff
path: root/test/functional/test_framework/mininode.py
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2018-08-11 06:59:08 -0400
committerMarcoFalke <falke.marco@gmail.com>2018-08-11 06:59:14 -0400
commita04888a075506c3cafe1d188c204bcb440089566 (patch)
tree2953936d33e7ddbb41220204778d00df3052e7ad /test/functional/test_framework/mininode.py
parenta08533c1a0bb54c47b231367673bb3fbb7559460 (diff)
parentfa85c985edbfd297aefb613445deab37c8769753 (diff)
downloadbitcoin-a04888a075506c3cafe1d188c204bcb440089566.tar.xz
Merge #13915: [qa] Add test for max number of entries in locator
fa85c985ed qa: Add p2p_invalid_locator test (MarcoFalke) Pull request description: Should not be merged *before* #13907 Tree-SHA512: a67ca407854c421ed20a184d0b0dc90085aed3e3431d9652a107fa3022244767e67f67e50449b7e95721f56906836b134615875f28a21e8a012eb22cfe6a66a5
Diffstat (limited to 'test/functional/test_framework/mininode.py')
-rwxr-xr-xtest/functional/test_framework/mininode.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/functional/test_framework/mininode.py b/test/functional/test_framework/mininode.py
index b7dce3dcb9..ba37e17930 100755
--- a/test/functional/test_framework/mininode.py
+++ b/test/functional/test_framework/mininode.py
@@ -332,6 +332,15 @@ class P2PInterface(P2PConnection):
test_function = lambda: self.last_message.get("block") and self.last_message["block"].block.rehash() == blockhash
wait_until(test_function, timeout=timeout, lock=mininode_lock)
+ def wait_for_header(self, blockhash, timeout=60):
+ def test_function():
+ last_headers = self.last_message.get('headers')
+ if not last_headers:
+ return False
+ return last_headers.headers[0].rehash() == blockhash
+
+ wait_until(test_function, timeout=timeout, lock=mininode_lock)
+
def wait_for_getdata(self, timeout=60):
"""Waits for a getdata message.