Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- genCoherentBlock ∷ ∀ era (r ∷ KeyRole) c. (EraSegWits era, Arbitrary (Tx era), Signable (KES c) ~ SignableRepresentation, PraosCrypto c) ⇒ [AllIssuerKeys c r] → Gen (Block (BHeader c) era)
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.