Skip to content

Commit fdd19cf

Browse files
UdjinM6codablock
authored andcommitted
Tests: Fix the way nodes are connected to each other in setup_network/start_masternodes (dashpay#3221)
* Tests: Connect to the control node only in start_masternodes Masternodes should take care of intra-quorum connections themselves * Reconnect non-masternodes back to the control node
1 parent 41f0e9d commit fdd19cf

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

qa/rpc-tests/test_framework/test_framework.py

+8-2
Original file line numberDiff line numberDiff line change
@@ -351,8 +351,8 @@ def do_start(idx):
351351
wait_to_sync(node, True)
352352

353353
def do_connect(idx):
354-
for i in range(0, idx + 1):
355-
connect_nodes(self.nodes[idx + start_idx], i)
354+
# Connect to the control node only, masternodes should take care of intra-quorum connections themselves
355+
connect_nodes(self.mninfo[idx].node, 0)
356356

357357
jobs = []
358358

@@ -403,6 +403,12 @@ def setup_network(self):
403403
self.prepare_datadirs()
404404
self.start_masternodes()
405405

406+
# non-masternodes where disconnected from the control node during prepare_datadirs,
407+
# let's reconnect them back to make sure they receive updates
408+
num_simple_nodes = self.num_nodes - self.mn_count - 1
409+
for i in range(0, num_simple_nodes):
410+
connect_nodes(self.nodes[i+1], 0)
411+
406412
set_mocktime(get_mocktime() + 1)
407413
set_node_times(self.nodes, get_mocktime())
408414
self.nodes[0].generate(1)

0 commit comments

Comments
 (0)