cardano-ledger-shelley-test-1.6.0.0: 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) c. (EraSegWits 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.