mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-26 03:03:22 -03:00
Work around #5113.
This commit is contained in:
parent
dcb98466b4
commit
2290ed01bc
2 changed files with 7 additions and 3 deletions
|
@ -43,12 +43,12 @@ class BitcoinTestFramework(object):
|
||||||
# If we joined network halves, connect the nodes from the joint
|
# If we joined network halves, connect the nodes from the joint
|
||||||
# on outward. This ensures that chains are properly reorganised.
|
# on outward. This ensures that chains are properly reorganised.
|
||||||
if not split:
|
if not split:
|
||||||
connect_nodes(self.nodes[2], 1)
|
connect_nodes_bi(self.nodes, 1, 2)
|
||||||
sync_blocks(self.nodes[1:2])
|
sync_blocks(self.nodes[1:2])
|
||||||
sync_mempools(self.nodes[1:2])
|
sync_mempools(self.nodes[1:2])
|
||||||
|
|
||||||
connect_nodes(self.nodes[1], 0)
|
connect_nodes_bi(self.nodes, 0, 1)
|
||||||
connect_nodes(self.nodes[3], 2)
|
connect_nodes_bi(self.nodes, 2, 3)
|
||||||
self.is_network_split = split
|
self.is_network_split = split
|
||||||
self.sync_all()
|
self.sync_all()
|
||||||
|
|
||||||
|
|
|
@ -194,6 +194,10 @@ def connect_nodes(from_connection, node_num):
|
||||||
while any(peer['version'] == 0 for peer in from_connection.getpeerinfo()):
|
while any(peer['version'] == 0 for peer in from_connection.getpeerinfo()):
|
||||||
time.sleep(0.1)
|
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):
|
def find_output(node, txid, amount):
|
||||||
"""
|
"""
|
||||||
Return index to output of txid with value amount
|
Return index to output of txid with value amount
|
||||||
|
|
Loading…
Add table
Reference in a new issue