Skip to content

Commit

Permalink
fix: mine_quorum_no_checks -> mine_quorum_less_checks: do some checks…
Browse files Browse the repository at this point in the history
… to make sure quorums are mined correctly
  • Loading branch information
UdjinM6 authored and knst committed Sep 23, 2024
1 parent 4f636f4 commit 874ef8c
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions test/functional/feature_llmq_simplepose.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,10 @@ def test_no_banning(self, expected_connections=None):
for mn in self.mninfo:
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
# nodes moving forward from phase to phase and the fact that the quorum is actually mined.
self.log.info("Mining a quorum with no checks")
# nodes moving forward from phase to phase correctly and the fact that the quorum is actually mined.
self.log.info("Mining a quorum with less checks")
nodes = [self.nodes[0]] + [mn.node for mn in mninfos_online]

# move forward to next DKG
Expand All @@ -112,7 +112,7 @@ def mine_quorum_no_check(self, expected_good_nodes, mninfos_online):
self.move_blocks(nodes, 2)

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.log.info("Waiting for phase 3 (complain)")
Expand All @@ -124,7 +124,7 @@ def mine_quorum_no_check(self, expected_good_nodes, mninfos_online):
self.move_blocks(nodes, 2)

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.log.info("Waiting for phase 6 (mining)")
Expand Down Expand Up @@ -175,7 +175,7 @@ def test_banning(self, invalidate_proc, expected_connections):
# 6th time is when it should be banned for sure.
for _ in range(6):
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)

Expand Down

0 comments on commit 874ef8c

Please sign in to comment.