mirror of
https://github.com/dashpay/dash.git
synced 2024-12-27 04:52:59 +01:00
Don't touch self.nodes/self.mninfo in llmq-simplepose.py
This commit is contained in:
parent
908eb8372b
commit
a308a092e2
@ -32,15 +32,15 @@ class LLMQSimplePoSeTest(DashTestFramework):
|
|||||||
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 kill MNs one by one and verify that punishment/banning happens
|
||||||
for i in range(len(self.mninfo), len(self.mninfo) - 2, -1):
|
online_mninfos = self.mninfo.copy()
|
||||||
mn = self.mninfo[len(self.mninfo) - 1]
|
for i in range(len(online_mninfos), len(online_mninfos) - 2, -1):
|
||||||
self.mninfo.remove(mn)
|
mn = online_mninfos[len(online_mninfos) - 1]
|
||||||
|
online_mninfos.remove(mn)
|
||||||
self.stop_node(mn.nodeIdx)
|
self.stop_node(mn.nodeIdx)
|
||||||
self.nodes.remove(mn.node)
|
|
||||||
|
|
||||||
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:
|
||||||
self.mine_quorum(expected_connections=1, expected_members=i-1, expected_contributions=i-1, expected_complaints=i-1, expected_commitments=i-1)
|
self.mine_quorum(expected_connections=1, expected_members=i-1, expected_contributions=i-1, expected_complaints=i-1, expected_commitments=i-1, mninfos=online_mninfos)
|
||||||
|
|
||||||
assert(self.check_punished(mn) and self.check_banned(mn))
|
assert(self.check_punished(mn) and self.check_banned(mn))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user