Skip to content

Commit be72ef5

Browse files
committed
test: use setmnthreadactive to get controlable connect_nodes behaviour
1 parent e2ed82a commit be72ef5

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

test/functional/test_framework/test_framework.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1083,6 +1083,8 @@ def __init__(self, proTxHash, ownerAddr, votingAddr, rewards_address, operator_r
10831083
self.collateral_vout = collateral_vout
10841084
self.addr = addr
10851085
self.evo = evo
1086+
self.node = None
1087+
self.nodeIdx = None
10861088

10871089

10881090
class DashTestFramework(BitcoinTestFramework):
@@ -1097,6 +1099,15 @@ def run_test(self):
10971099
"""Tests must override this method to define test logic"""
10981100
raise NotImplementedError
10991101

1102+
def connect_nodes(self, a, b):
1103+
for mn2 in self.mninfo:
1104+
if mn2.node is not None:
1105+
mn2.node.setmnthreadactive(False)
1106+
super().connect_nodes(a, b)
1107+
for mn2 in self.mninfo:
1108+
if mn2.node is not None:
1109+
mn2.node.setmnthreadactive(True)
1110+
11001111
def set_dash_test_params(self, num_nodes, masterodes_count, extra_args=None, fast_dip3_enforcement=False, evo_count=0):
11011112
self.mn_count = masterodes_count
11021113
self.evo_count = evo_count

0 commit comments

Comments
 (0)