diff options
author | Daniel Kraft <d@domob.eu> | 2014-10-24 09:06:37 +0200 |
---|---|---|
committer | Daniel Kraft <d@domob.eu> | 2014-10-24 09:06:37 +0200 |
commit | 2290ed01bc1b4176a0c6b976707bf7dd6bc49f43 (patch) | |
tree | c42bba84957b04ed1c2b9b83cc723128842a95b7 /qa/rpc-tests | |
parent | dcb98466b4f8193fc28656d17b2317f21665fa3a (diff) |
Work around #5113.
Diffstat (limited to 'qa/rpc-tests')
-rwxr-xr-x | qa/rpc-tests/test_framework.py | 6 | ||||
-rw-r--r-- | qa/rpc-tests/util.py | 4 |
2 files changed, 7 insertions, 3 deletions
diff --git a/qa/rpc-tests/test_framework.py b/qa/rpc-tests/test_framework.py index f226496d0f..1746294691 100755 --- a/qa/rpc-tests/test_framework.py +++ b/qa/rpc-tests/test_framework.py @@ -43,12 +43,12 @@ class BitcoinTestFramework(object): # If we joined network halves, connect the nodes from the joint # on outward. This ensures that chains are properly reorganised. if not split: - connect_nodes(self.nodes[2], 1) + connect_nodes_bi(self.nodes, 1, 2) sync_blocks(self.nodes[1:2]) sync_mempools(self.nodes[1:2]) - connect_nodes(self.nodes[1], 0) - connect_nodes(self.nodes[3], 2) + connect_nodes_bi(self.nodes, 0, 1) + connect_nodes_bi(self.nodes, 2, 3) self.is_network_split = split self.sync_all() diff --git a/qa/rpc-tests/util.py b/qa/rpc-tests/util.py index 87baadc5d6..036ac577e6 100644 --- a/qa/rpc-tests/util.py +++ b/qa/rpc-tests/util.py @@ -194,6 +194,10 @@ def connect_nodes(from_connection, node_num): while any(peer['version'] == 0 for peer in from_connection.getpeerinfo()): time.sleep(0.1) +def connect_nodes_bi(nodes, a, b): + connect_nodes(nodes[a], b) + connect_nodes(nodes[b], a) + def find_output(node, txid, amount): """ Return index to output of txid with value amount |