mirror of
https://github.com/dashpay/dash.git
synced 2024-12-27 04:52:59 +01:00
Merge pull request #4394 from laanwj/2014_06_rpc_tests_connectnode
qa/rpc_tests: Wait for handshake to complete in connect_nodes
This commit is contained in:
commit
6d875669aa
@ -182,6 +182,10 @@ def wait_bitcoinds():
|
|||||||
def connect_nodes(from_connection, node_num):
|
def connect_nodes(from_connection, node_num):
|
||||||
ip_port = "127.0.0.1:"+str(p2p_port(node_num))
|
ip_port = "127.0.0.1:"+str(p2p_port(node_num))
|
||||||
from_connection.addnode(ip_port, "onetry")
|
from_connection.addnode(ip_port, "onetry")
|
||||||
|
# poll until version handshake complete to avoid race conditions
|
||||||
|
# with transaction relaying
|
||||||
|
while any(peer['version'] == 0 for peer in from_connection.getpeerinfo()):
|
||||||
|
time.sleep(0.1)
|
||||||
|
|
||||||
def find_output(node, txid, amount):
|
def find_output(node, txid, amount):
|
||||||
"""
|
"""
|
||||||
|
Loading…
Reference in New Issue
Block a user