From d8c683fb4cfdce985798f3dcbcc9dcffa26c7e21 Mon Sep 17 00:00:00 2001 From: Nicholas Dudfield Date: Thu, 9 Apr 2026 18:09:17 +0700 Subject: [PATCH] test(rng): fix AlignmentRequired test to run 1 round not 3 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Running 3 rounds caused peer 0 to desync on round 2, dropping prevProposers for the majority on round 3, triggering bootstrap skip → zero entropy on the last round. The gate works correctly (logs show aligned=3, peersSeen=3) but the test was checking the LAST round's entropy, not the round where the gate was exercised. Run 1 round after warmup — sufficient to exercise the gate. --- src/test/consensus/ConsensusRng_test.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/test/consensus/ConsensusRng_test.cpp b/src/test/consensus/ConsensusRng_test.cpp index 8ca627967..5e771b9c4 100644 --- a/src/test/consensus/ConsensusRng_test.cpp +++ b/src/test/consensus/ConsensusRng_test.cpp @@ -823,7 +823,10 @@ public: for (std::size_t i = 1; i < peers.size(); ++i) peers[0]->ce().dropRevealFrom_.insert(peers[i]->id); - sim.run(3); + // Run just 1 round — enough to exercise the gate. + // More rounds cause peer 0 to desync, dropping prevProposers + // and triggering bootstrap skip on the final round. + sim.run(1); // The majority (peers 1-4) should agree on non-zero entropy std::vector majority;