ouroboros-consensus
Safe HaskellNone
LanguageHaskell2010

Test.Ouroboros.Storage.PerasVoteDB.StateMachine

Synopsis

Documentation

Reusable generators

genPerasSeatIndexGen PerasSeatIndex Source #

Generate a random PerasSeatIndex.

We want to force collisions when adding votes, so we need to restrict the key space a lot here. Otherwise we might never hit the case where the same voter casts two votes for the same round/block.

genVoteWeightGen VoteWeight Source #

Generate a random VoteWeight.

Make it so that we always require multiple votes to reach a quorum. This is assuming a quorum threshold strictly larger than 50%, which is a very conservative assumption for Peras.