Skip to content

Commit a0283cf

Browse files
committed
test: fix flaky LLMQ signing recovery and PoSe ban assertions
- feature_llmq_signing.py: bump_mocktime(2) was shorter than the daemon's 5-second signing session cleanup cadence (CLEANUP_INTERVAL in signing_shares.cpp), so recovery responsibility never rotated to the next member. Use bump_mocktime(10) to guarantee at least one full cleanup cycle, and extend wait_for_sigs timeout from 2s to 15s for propagation margin. - feature_llmq_simplepose.py: replace bare `assert check_banned()` with `wait_until(check_banned, timeout=10)`. After mine_quorum() returns, PoSe ban state may not be visible via RPC immediately under CPU contention.
1 parent 39851c3 commit a0283cf

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

test/functional/feature_llmq_signing.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -196,9 +196,11 @@ def assert_sigs_nochange(hasrecsigs, isconflicting1, isconflicting2, timeout):
196196
self.wait_until(lambda: mn.get_node(self).getconnectioncount() == self.llmq_size, timeout=10)
197197
mn.get_node(self).ping()
198198
self.wait_until(lambda: all('pingwait' not in peer for peer in mn.get_node(self).getpeerinfo()))
199-
# Let 2 seconds pass so that the next node is used for recovery, which should succeed
200-
self.bump_mocktime(2)
201-
wait_for_sigs(True, False, True, 2)
199+
# Advance mocktime past the daemon's 5-second signing session
200+
# cleanup cadence so recovery responsibility rotates to the next
201+
# member. Use 10s to guarantee at least one full cycle completes.
202+
self.bump_mocktime(10)
203+
wait_for_sigs(True, False, True, 15)
202204

203205
if __name__ == '__main__':
204206
LLMQSigningTest().main()

test/functional/feature_llmq_simplepose.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ def test_banning(self, invalidate_proc, expected_connections=None):
203203
if check_banned(self.nodes[0], mn):
204204
break
205205

206-
assert check_banned(self.nodes[0], mn)
206+
self.wait_until(lambda: check_banned(self.nodes[0], mn), timeout=10)
207207

208208
if not went_offline:
209209
# we do not include PoSe banned mns in quorums, so the next one should have 1 contributor less

0 commit comments

Comments
 (0)