ouroboros-consensus-mock-test-0.1.0.0: Tests of the mock ledger integration in the Ouroboros consensus layer
Safe HaskellNone
LanguageHaskell2010

Test.Consensus.Ledger.Mock.Generators

Orphan instances

Arbitrary SimpleBody Source # 
Instance details

Arbitrary Tx Source # 
Instance details

Methods

arbitrary ∷ Gen Tx

shrinkTx → [Tx]

Arbitrary Addr Source # 
Instance details

Methods

arbitrary ∷ Gen Addr

shrinkAddr → [Addr]

HashAlgorithm (SimpleHash c) ⇒ Arbitrary (AnnTip (SimpleBlock c ext)) Source # 
Instance details

Methods

arbitrary ∷ Gen (AnnTip (SimpleBlock c ext))

shrinkAnnTip (SimpleBlock c ext) → [AnnTip (SimpleBlock c ext)]

Arbitrary (GenTx (SimpleBlock c ext)) Source # 
Instance details

Methods

arbitrary ∷ Gen (GenTx (SimpleBlock c ext))

shrinkGenTx (SimpleBlock c ext) → [GenTx (SimpleBlock c ext)]

Arbitrary (TxId (GenTx (SimpleBlock c ext))) Source # 
Instance details

Methods

arbitrary ∷ Gen (TxId (GenTx (SimpleBlock c ext)))

shrinkTxId (GenTx (SimpleBlock c ext)) → [TxId (GenTx (SimpleBlock c ext))]

Arbitrary (LedgerState (SimpleBlock c ext)) Source # 
Instance details

Methods

arbitrary ∷ Gen (LedgerState (SimpleBlock c ext))

shrinkLedgerState (SimpleBlock c ext) → [LedgerState (SimpleBlock c ext)]

(SimpleCrypto c, Arbitrary ext, Serialise ext, Typeable ext) ⇒ Arbitrary (Header (SimpleBlock c ext)) Source # 
Instance details

Methods

arbitrary ∷ Gen (Header (SimpleBlock c ext))

shrinkHeader (SimpleBlock c ext) → [Header (SimpleBlock c ext)]

Arbitrary (HeaderHash blk) ⇒ Arbitrary (Point blk) Source # 
Instance details

Methods

arbitrary ∷ Gen (Point blk)

shrinkPoint blk → [Point blk]

Arbitrary (HeaderHash blk) ⇒ Arbitrary (ChainHash blk) Source # 
Instance details

Methods

arbitrary ∷ Gen (ChainHash blk)

shrinkChainHash blk → [ChainHash blk]

Arbitrary (MockState blk) Source # 
Instance details

Methods

arbitrary ∷ Gen (MockState blk)

shrinkMockState blk → [MockState blk]

Arbitrary (HeaderHash blk) ⇒ Arbitrary (MockError blk) Source # 
Instance details

Methods

arbitrary ∷ Gen (MockError blk)

shrinkMockError blk → [MockError blk]

(SimpleCrypto c, Arbitrary ext, Serialise ext) ⇒ Arbitrary (Coherent (SimpleBlock c ext)) Source #

This blindly creates random values, so the block will not be valid, but this does not matter for serialisation tests. Except we do touch-up the simpleBodySize; hence Coherent.

Instance details

Methods

arbitrary ∷ Gen (Coherent (SimpleBlock c ext))

shrinkCoherent (SimpleBlock c ext) → [Coherent (SimpleBlock c ext)]

(SimpleCrypto c, Typeable ext) ⇒ Arbitrary (SomeResult (SimpleBlock c ext)) Source # 
Instance details

Methods

arbitrary ∷ Gen (SomeResult (SimpleBlock c ext))

shrinkSomeResult (SimpleBlock c ext) → [SomeResult (SimpleBlock c ext)]

Arbitrary (BftFields BftMockCrypto toSign) Source # 
Instance details

Methods

arbitrary ∷ Gen (BftFields BftMockCrypto toSign)

shrinkBftFields BftMockCrypto toSign → [BftFields BftMockCrypto toSign]

Arbitrary (SomeSecond BlockQuery (SimpleBlock c ext)) Source # 
Instance details

Arbitrary (SomeSecond (NestedCtxt Header) (SimpleBlock c ext)) Source # 
Instance details

Arbitrary (SimpleBftExt c BftMockCrypto) Source # 
Instance details

(SimpleCrypto c, Arbitrary ext, Serialise ext) ⇒ Arbitrary (SimpleBlock c ext) Source #

This blindly creates random values, so the block will not be valid, but this does not matter for serialisation tests.

Instance details

Methods

arbitrary ∷ Gen (SimpleBlock c ext)

shrinkSimpleBlock c ext → [SimpleBlock c ext]

(HashAlgorithm (SimpleHash c), Arbitrary ext, Serialise ext) ⇒ Arbitrary (SimpleStdHeader c ext) Source # 
Instance details

Methods

arbitrary ∷ Gen (SimpleStdHeader c ext)

shrinkSimpleStdHeader c ext → [SimpleStdHeader c ext]

HashAlgorithm h ⇒ Arbitrary (Hash h a) Source # 
Instance details

Methods

arbitrary ∷ Gen (Hash h a)

shrink ∷ Hash h a → [Hash h a]