| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Test.Ouroboros.Storage.PerasVoteDB.StateMachine
Contents
Synopsis
Documentation
Reusable generators
genVoterId ∷ Gen PerasVoterId Source #
Generate a random PerasVoterId.
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.
genVoteStake ∷ Gen PerasVoteStake Source #
Generate a random PerasVoteStake.
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.