mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 12:02:48 +01:00
fix: calculate expected_complaints correctly
This commit is contained in:
parent
61201b80da
commit
2069625759
@ -161,6 +161,7 @@ class LLMQSimplePoSeTest(DashTestFramework):
|
|||||||
for _ in range(2):
|
for _ in range(2):
|
||||||
mn = mninfos_valid.pop()
|
mn = mninfos_valid.pop()
|
||||||
went_offline, instant_ban = invalidate_proc(mn)
|
went_offline, instant_ban = invalidate_proc(mn)
|
||||||
|
expected_complaints = expected_contributors - 1
|
||||||
if went_offline:
|
if went_offline:
|
||||||
mninfos_online.remove(mn)
|
mninfos_online.remove(mn)
|
||||||
expected_contributors -= 1
|
expected_contributors -= 1
|
||||||
@ -169,7 +170,7 @@ class LLMQSimplePoSeTest(DashTestFramework):
|
|||||||
# so nodes are PoSe-banned in the same DKG they misbehave without being PoSe-punished first.
|
# so nodes are PoSe-banned in the same DKG they misbehave without being PoSe-punished first.
|
||||||
if instant_ban:
|
if instant_ban:
|
||||||
self.reset_probe_timeouts()
|
self.reset_probe_timeouts()
|
||||||
self.mine_quorum(expected_connections=expected_connections, expected_members=expected_contributors, expected_contributions=expected_contributors, expected_complaints=expected_contributors-1, expected_commitments=expected_contributors, mninfos_online=mninfos_online, mninfos_valid=mninfos_valid)
|
self.mine_quorum(expected_connections=expected_connections, expected_members=expected_contributors, expected_contributions=expected_contributors, expected_complaints=expected_complaints, expected_commitments=expected_contributors, mninfos_online=mninfos_online, mninfos_valid=mninfos_valid)
|
||||||
else:
|
else:
|
||||||
# It's ok to miss probes/quorum connections up to 5 times.
|
# It's ok to miss probes/quorum connections up to 5 times.
|
||||||
# 6th time is when it should be banned for sure.
|
# 6th time is when it should be banned for sure.
|
||||||
|
Loading…
Reference in New Issue
Block a user