diff options
author | MarcoFalke <falke.marco@gmail.com> | 2019-05-09 10:42:56 -0400 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2019-05-13 10:44:42 -0400 |
commit | fa320de79faaca2b088fcbe7f76701faa9bff236 (patch) | |
tree | 3f43f5c316901197825a260e0f12083cb6d90880 /test/functional/test_framework | |
parent | fa3872e7b4540857261aed948b94b6b2bfdbc3d1 (diff) |
test: Add test for p2p_blocksonly
Diffstat (limited to 'test/functional/test_framework')
-rwxr-xr-x | test/functional/test_framework/mininode.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/functional/test_framework/mininode.py b/test/functional/test_framework/mininode.py index 11ea968257..cc3a4cc72a 100755 --- a/test/functional/test_framework/mininode.py +++ b/test/functional/test_framework/mininode.py @@ -361,6 +361,14 @@ class P2PInterface(P2PConnection): # Message receiving helper methods + def wait_for_tx(self, txid, timeout=60): + def test_function(): + if not self.last_message.get('tx'): + return False + return self.last_message['tx'].tx.rehash() == txid + + wait_until(test_function, timeout=timeout, lock=mininode_lock) + def wait_for_block(self, blockhash, timeout=60): 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) |