aboutsummaryrefslogtreecommitdiff
path: root/test/functional/test_framework
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2018-08-09 08:07:16 -0400
committerMarcoFalke <falke.marco@gmail.com>2018-08-09 08:07:28 -0400
commit8ac7125d59ce874d2bc37f5a8dddcc42fc2b5780 (patch)
treedfb375153e79693bea6ae89922e7561f3d3229db /test/functional/test_framework
parent8eb987005288e9c13d46b2f6b5bf5c3aaddd8b06 (diff)
parentfa5587fe71ce041dc69cb0d46697975bb51ef1f6 (diff)
Merge #13916: qa: wait_for_verack by default
fa5587fe71 qa: wait_for_verack by default (MarcoFalke) Pull request description: This removes the need to do so manually every time a connection is added. Tree-SHA512: a46c92cb4df41e30778b42b9fd3dcbd8d2d82aa7503d1213cb1c1165034f648d8caee01c292e2d87d05b0f71696996eef5be8a753f35ab49e5f66b0e3bf29f21
Diffstat (limited to 'test/functional/test_framework')
-rwxr-xr-xtest/functional/test_framework/test_node.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/test/functional/test_framework/test_node.py b/test/functional/test_framework/test_node.py
index 7164a9beef..56ea110f16 100755
--- a/test/functional/test_framework/test_node.py
+++ b/test/functional/test_framework/test_node.py
@@ -276,7 +276,7 @@ class TestNode():
self.encryptwallet(passphrase)
self.wait_until_stopped()
- def add_p2p_connection(self, p2p_conn, *args, **kwargs):
+ def add_p2p_connection(self, p2p_conn, *, wait_for_verack=True, **kwargs):
"""Add a p2p connection to the node.
This method adds the p2p connection to the self.p2ps list and also
@@ -286,8 +286,10 @@ class TestNode():
if 'dstaddr' not in kwargs:
kwargs['dstaddr'] = '127.0.0.1'
- p2p_conn.peer_connect(*args, **kwargs)()
+ p2p_conn.peer_connect(**kwargs)()
self.p2ps.append(p2p_conn)
+ if wait_for_verack:
+ p2p_conn.wait_for_verack()
return p2p_conn