Skip to content

Commit b4b9d34

Browse files
UdjinM6codablock
authored andcommitted
Tests: Fix the way nodes are connected to each other in setup_network/start_masternodes (#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 dfe99c9 commit b4b9d34

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

test/functional/test_framework/test_framework.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -583,8 +583,8 @@ def do_start(idx):
583583
force_finish_mnsync(self.mninfo[idx].node)
584584

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

589589
jobs = []
590590

@@ -634,6 +634,11 @@ def setup_network(self):
634634
self.prepare_datadirs()
635635
self.start_masternodes()
636636

637+
# non-masternodes where disconnected from the control node during prepare_datadirs,
638+
# let's reconnect them back to make sure they receive updates
639+
for i in range(0, num_simple_nodes):
640+
connect_nodes(self.nodes[i+1], 0)
641+
637642
self.bump_mocktime(1)
638643
set_node_times(self.nodes, self.mocktime)
639644
self.nodes[0].generate(1)

0 commit comments

Comments
 (0)