Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- 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)
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.