mirror of
https://github.com/dashpay/dash.git
synced 2024-12-26 04:22:55 +01:00
Isolate instead of kill MNs in llmq-simplepose.py
This commit is contained in:
parent
a308a092e2
commit
e980b18b68
@ -31,12 +31,13 @@ class LLMQSimplePoSeTest(DashTestFramework):
|
|||||||
for mn in self.mninfo:
|
for mn in self.mninfo:
|
||||||
assert(not self.check_punished(mn) and not self.check_banned(mn))
|
assert(not self.check_punished(mn) and not self.check_banned(mn))
|
||||||
|
|
||||||
# Now lets kill MNs one by one and verify that punishment/banning happens
|
# Now lets isolate MNs one by one and verify that punishment/banning happens
|
||||||
online_mninfos = self.mninfo.copy()
|
online_mninfos = self.mninfo.copy()
|
||||||
for i in range(len(online_mninfos), len(online_mninfos) - 2, -1):
|
for i in range(len(online_mninfos), len(online_mninfos) - 2, -1):
|
||||||
mn = online_mninfos[len(online_mninfos) - 1]
|
mn = online_mninfos[len(online_mninfos) - 1]
|
||||||
online_mninfos.remove(mn)
|
online_mninfos.remove(mn)
|
||||||
self.stop_node(mn.nodeIdx)
|
mn.node.setnetworkactive(False)
|
||||||
|
wait_until(lambda: mn.node.getconnectioncount() == 0)
|
||||||
|
|
||||||
t = time.time()
|
t = time.time()
|
||||||
while (not self.check_punished(mn) or not self.check_banned(mn)) and (time.time() - t) < 120:
|
while (not self.check_punished(mn) or not self.check_banned(mn)) and (time.time() - t) < 120:
|
||||||
|
Loading…
Reference in New Issue
Block a user