mirror of
https://github.com/Xahau/xahaud.git
synced 2026-04-29 15:37:46 +00:00
test(rng): fix AlignmentRequired test to run 1 round not 3
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.
This commit is contained in:
@@ -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<Peer const*> majority;
|
||||
|
||||
Reference in New Issue
Block a user