test: Wait until is_connected in add_p2p_connection

This commit is contained in:
MarcoFalke committed 2020-08-04 16:13:33 +02:00
1 parent 3c93623be2
commit fa4dfd215f
4 files changed
+11 -14

No files matched your search

+1 -1
View File
@@ -474,7 +474,7 @@ class P2PInterface(P2PConnection):
def test_function():
return "verack" in self.last_message
self.wait_until(test_function, timeout=timeout, check_connected=False)
self.wait_until(test_function, timeout=timeout)
# Message sending helper functions
@@ -524,6 +524,7 @@ class TestNode():
p2p_conn.peer_connect(**kwargs, net=self.chain, timeout_factor=self.timeout_factor)()
self.p2ps.append(p2p_conn)
p2p_conn.wait_until(lambda: p2p_conn.is_connected, check_connected=False)
if wait_for_verack:
# Wait for the node to send us the version and verack
p2p_conn.wait_for_verack()