cardano-ledger-shelley-test-1.4.0.3: Test helpers from cardano-ledger-shelley exposed to other packages
Safe HaskellSafe-Inferred
LanguageHaskell2010

Test.Cardano.Ledger.Shelley.Serialisation.EraIndepGenerators

Synopsis

Documentation

genCoherentBlock ∷ ∀ era (r ∷ KeyRole). (EraSegWits era, Arbitrary (Tx era), Signable (KES (EraCrypto era)) ~ SignableRepresentation, Signable (DSIGN (EraCrypto era)) ~ SignableRepresentation, PraosCrypto (EraCrypto era)) ⇒ [AllIssuerKeys (EraCrypto era) r] → Gen (Block (BHeader (EraCrypto era)) 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.