| Safe Haskell | Safe-Inferred | 
|---|---|
| Language | Haskell2010 | 
Test.Cardano.Ledger.Shelley.Serialisation.EraIndepGenerators
Synopsis
- genCoherentBlock ∷ ∀ era (r ∷ KeyRole) c. (EraBlockBody era, Arbitrary (Tx era), Signable (KES c) ~ SignableRepresentation, PraosCrypto c) ⇒ [AllIssuerKeys c r] → Gen (Block (BHeader c) era)
Documentation
genCoherentBlock ∷ ∀ era (r ∷ KeyRole) c. (EraBlockBody era, Arbitrary (Tx era), Signable (KES c) ~ SignableRepresentation, PraosCrypto c) ⇒ [AllIssuerKeys c r] → Gen (Block (BHeader c) era) Source #
For some purposes, a totally random block generator may not be suitable. There are tests in the ouroboros-network repository, for instance, that perform some integrity checks on the generated blocks.
For other purposes, such as the serialization tests in this repository,
 genBlock is more appropriate.
This generator uses mkBlock provide more coherent blocks.