fix: mine_quorum_no_checks -> mine_quorum_less_checks: do some checks to make sure quorums are mined correctly

This commit is contained in:
UdjinM6 2024-09-17 17:46:12 +03:00 committed by Konstantin Akimov
parent 4f636f47b4
commit 874ef8cda2
No known key found for this signature in database
GPG Key ID: 2176C4A5D01EA524

View File

@ -92,10 +92,10 @@ 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)
def mine_quorum_no_check(self, expected_good_nodes, mninfos_online): def mine_quorum_less_checks(self, expected_good_nodes, mninfos_online):
# Unlike in mine_quorum we skip most of the checks and only care about # Unlike in mine_quorum we skip most of the checks and only care about
# nodes moving forward from phase to phase and the fact that the quorum is actually mined. # nodes moving forward from phase to phase correctly and the fact that the quorum is actually mined.
self.log.info("Mining a quorum with no checks") self.log.info("Mining a quorum with less checks")
nodes = [self.nodes[0]] + [mn.node for mn in mninfos_online] nodes = [self.nodes[0]] + [mn.node for mn in mninfos_online]
# move forward to next DKG # move forward to next DKG
@ -112,7 +112,7 @@ class LLMQSimplePoSeTest(DashTestFramework):
self.move_blocks(nodes, 2) self.move_blocks(nodes, 2)
self.log.info("Waiting for phase 2 (contribute)") self.log.info("Waiting for phase 2 (contribute)")
self.wait_for_quorum_phase(q, 2, expected_good_nodes, None, 0, mninfos_online) self.wait_for_quorum_phase(q, 2, expected_good_nodes, "receivedContributions", expected_good_nodes, mninfos_online)
self.move_blocks(nodes, 2) self.move_blocks(nodes, 2)
self.log.info("Waiting for phase 3 (complain)") self.log.info("Waiting for phase 3 (complain)")
@ -124,7 +124,7 @@ class LLMQSimplePoSeTest(DashTestFramework):
self.move_blocks(nodes, 2) self.move_blocks(nodes, 2)
self.log.info("Waiting for phase 5 (commit)") self.log.info("Waiting for phase 5 (commit)")
self.wait_for_quorum_phase(q, 5, expected_good_nodes, None, 0, mninfos_online) self.wait_for_quorum_phase(q, 5, expected_good_nodes, "receivedPrematureCommitments", expected_good_nodes, mninfos_online)
self.move_blocks(nodes, 2) self.move_blocks(nodes, 2)
self.log.info("Waiting for phase 6 (mining)") self.log.info("Waiting for phase 6 (mining)")
@ -175,7 +175,7 @@ class LLMQSimplePoSeTest(DashTestFramework):
# 6th time is when it should be banned for sure. # 6th time is when it should be banned for sure.
for _ in range(6): for _ in range(6):
self.reset_probe_timeouts() self.reset_probe_timeouts()
self.mine_quorum_no_check(expected_contributors - 1, mninfos_online) self.mine_quorum_less_checks(expected_contributors - 1, mninfos_online)
assert self.check_banned(mn) assert self.check_banned(mn)