mirror of
https://github.com/luxfi/consensus.git
synced 2026-09-24 00:26:58 +00:00
Fixed SimpleConsensus.Vote() to set finalized=true even when block is already accepted. Previously, only the first node to vote would finalize, causing tests to fail with only 1/N nodes finalized. Changes: - Modified Vote() to separate block acceptance from finalization - Now sets finalized=true for any valid block, regardless of status - Added network-wide finalization check with 50% threshold - Implemented parallel polling (10% of nodes per round) for faster convergence Results: - TestRandomizedConsistency: PASS (1 round convergence) - TestPropertyBasedConsensus: ALL PASS - TestConsensusAtScale: PASS (up to 1000 nodes) - TestChaosConsensus: PASS Outstanding: TestNetworkScalability and TestDAGConsensus use different simulation framework and require separate investigation.