Skip to content

Tests: Fix the way nodes are connected to each other in setup_network/start_masternodes #3221

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 5, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions test/functional/test_framework/test_framework.py
Original file line number Diff line number Diff line change
Expand Up @@ -581,8 +581,8 @@ def do_start(idx):
force_finish_mnsync(self.mninfo[idx].node)

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 @@ -632,6 +632,11 @@ 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
for i in range(0, num_simple_nodes):
connect_nodes(self.nodes[i+1], 0)

self.bump_mocktime(1)
set_node_times(self.nodes, self.mocktime)
self.nodes[0].generate(1)
Expand Down