cardano-ledger-binary-1.4.0.0: Binary serialization library used throughout ledger
Safe HaskellSafe-Inferred
LanguageHaskell2010

Test.Cardano.Ledger.Binary.Random

Synopsis

Documentation

data QC Source #

This is a pseudo random number generator used by QuickCheck and allows to use random's stateful interface to work dierctly in Gen monad. This comes from an unmerged QuickCheck PR: https://github.com/nick8325/quickcheck/pull/333

Constructors

QC 

mkDummyHash ∷ ∀ h a b. (HashAlgorithm h, EncCBOR a) ⇒ a → Hash h b Source #

It is possible to use a hash of a binary representation of any type as a source of randomness, since hash value by its definiteion is uniformly distributed.

mkHashStdGenEncCBOR x ⇒ x → StdGen Source #

Use a hash of the binary representation of a type as a seed to construct StdGen, that can be further used to generate random values.