Skip to content

Commit 874ef8c

Browse files
UdjinM6knst
authored andcommitted
fix: mine_quorum_no_checks -> mine_quorum_less_checks: do some checks to make sure quorums are mined correctly
1 parent 4f636f4 commit 874ef8c

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

test/functional/feature_llmq_simplepose.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,10 @@ def test_no_banning(self, expected_connections=None):
9292
for mn in self.mninfo:
9393
assert not self.check_punished(mn) and not self.check_banned(mn)
9494

95-
def mine_quorum_no_check(self, expected_good_nodes, mninfos_online):
95+
def mine_quorum_less_checks(self, expected_good_nodes, mninfos_online):
9696
# Unlike in mine_quorum we skip most of the checks and only care about
97-
# nodes moving forward from phase to phase and the fact that the quorum is actually mined.
98-
self.log.info("Mining a quorum with no checks")
97+
# nodes moving forward from phase to phase correctly and the fact that the quorum is actually mined.
98+
self.log.info("Mining a quorum with less checks")
9999
nodes = [self.nodes[0]] + [mn.node for mn in mninfos_online]
100100

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

114114
self.log.info("Waiting for phase 2 (contribute)")
115-
self.wait_for_quorum_phase(q, 2, expected_good_nodes, None, 0, mninfos_online)
115+
self.wait_for_quorum_phase(q, 2, expected_good_nodes, "receivedContributions", expected_good_nodes, mninfos_online)
116116
self.move_blocks(nodes, 2)
117117

118118
self.log.info("Waiting for phase 3 (complain)")
@@ -124,7 +124,7 @@ def mine_quorum_no_check(self, expected_good_nodes, mninfos_online):
124124
self.move_blocks(nodes, 2)
125125

126126
self.log.info("Waiting for phase 5 (commit)")
127-
self.wait_for_quorum_phase(q, 5, expected_good_nodes, None, 0, mninfos_online)
127+
self.wait_for_quorum_phase(q, 5, expected_good_nodes, "receivedPrematureCommitments", expected_good_nodes, mninfos_online)
128128
self.move_blocks(nodes, 2)
129129

130130
self.log.info("Waiting for phase 6 (mining)")
@@ -175,7 +175,7 @@ def test_banning(self, invalidate_proc, expected_connections):
175175
# 6th time is when it should be banned for sure.
176176
for _ in range(6):
177177
self.reset_probe_timeouts()
178-
self.mine_quorum_no_check(expected_contributors - 1, mninfos_online)
178+
self.mine_quorum_less_checks(expected_contributors - 1, mninfos_online)
179179

180180
assert self.check_banned(mn)
181181

0 commit comments

Comments
 (0)