From 4ec385d020a6e4c560bd6fda6d119a0646baffd7 Mon Sep 17 00:00:00 2001 From: Konstantin Akimov Date: Thu, 21 Nov 2024 16:58:05 +0700 Subject: [PATCH] refactor: simplify loop of node connection in test_framework --- test/functional/test_framework/test_framework.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test/functional/test_framework/test_framework.py b/test/functional/test_framework/test_framework.py index ff0fc848d2..99c63cdd4e 100755 --- a/test/functional/test_framework/test_framework.py +++ b/test/functional/test_framework/test_framework.py @@ -1511,16 +1511,16 @@ class DashTestFramework(BitcoinTestFramework): # 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): - self.connect_nodes(i+1, 0) + num_simple_nodes = self.num_nodes - self.mn_count + for i in range(1, num_simple_nodes): + self.connect_nodes(i, 0) self.start_masternodes() self.bump_mocktime(1) self.generate(self.nodes[0], 1) - for i in range(0, num_simple_nodes): - force_finish_mnsync(self.nodes[i + 1]) + for i in range(1, num_simple_nodes): + force_finish_mnsync(self.nodes[i]) # Enable InstantSend (including block filtering) and ChainLocks by default self.nodes[0].sporkupdate("SPORK_2_INSTANTSEND_ENABLED", 0)