mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 03:52:49 +01:00
test: use setmnthreadactive
to get controlable connect_nodes
behaviour
This commit is contained in:
parent
e2ed82a7ae
commit
be72ef5592
@ -1083,6 +1083,8 @@ class MasternodeInfo:
|
||||
self.collateral_vout = collateral_vout
|
||||
self.addr = addr
|
||||
self.evo = evo
|
||||
self.node = None
|
||||
self.nodeIdx = None
|
||||
|
||||
|
||||
class DashTestFramework(BitcoinTestFramework):
|
||||
@ -1097,6 +1099,15 @@ class DashTestFramework(BitcoinTestFramework):
|
||||
"""Tests must override this method to define test logic"""
|
||||
raise NotImplementedError
|
||||
|
||||
def connect_nodes(self, a, b):
|
||||
for mn2 in self.mninfo:
|
||||
if mn2.node is not None:
|
||||
mn2.node.setmnthreadactive(False)
|
||||
super().connect_nodes(a, b)
|
||||
for mn2 in self.mninfo:
|
||||
if mn2.node is not None:
|
||||
mn2.node.setmnthreadactive(True)
|
||||
|
||||
def set_dash_test_params(self, num_nodes, masterodes_count, extra_args=None, fast_dip3_enforcement=False, evo_count=0):
|
||||
self.mn_count = masterodes_count
|
||||
self.evo_count = evo_count
|
||||
|
Loading…
Reference in New Issue
Block a user