Skip to content

Commit

Permalink
Tests: Fix the way nodes are connected to each other in setup_network…
Browse files Browse the repository at this point in the history
…/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
  • Loading branch information
UdjinM6 authored and codablock committed Dec 6, 2019
1 parent 41f0e9d commit fdd19cf
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions qa/rpc-tests/test_framework/test_framework.py
Original file line number Diff line number Diff line change
Expand Up @@ -351,8 +351,8 @@ def do_start(idx):
wait_to_sync(node, True)

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

jobs = []

Expand Down Expand Up @@ -403,6 +403,12 @@ def setup_network(self):
self.prepare_datadirs()
self.start_masternodes()

# non-masternodes where disconnected from the control node during prepare_datadirs,
# let's reconnect them back to make sure they receive updates
num_simple_nodes = self.num_nodes - self.mn_count - 1
for i in range(0, num_simple_nodes):
connect_nodes(self.nodes[i+1], 0)

set_mocktime(get_mocktime() + 1)
set_node_times(self.nodes, get_mocktime())
self.nodes[0].generate(1)
Expand Down

0 comments on commit fdd19cf

Please sign in to comment.