ouroboros-consensus:unstable-mock-testlib
Safe HaskellNone
LanguageHaskell2010

Test.Consensus.Ledger.Mock.Generators

Orphan instances

Arbitrary ByteSize32 Source # 
Instance details

Arbitrary Addr Source # 
Instance details

Methods

arbitrary ∷ Gen Addr Source #

shrink ∷ Addr → [Addr] Source #

Arbitrary SimpleBody Source # 
Instance details

Methods

arbitrary ∷ Gen SimpleBody Source #

shrink ∷ SimpleBody → [SimpleBody] Source #

Arbitrary MockConfig Source # 
Instance details

Methods

arbitrary ∷ Gen MockConfig Source #

shrink ∷ MockConfig → [MockConfig] Source #

Arbitrary Tx Source # 
Instance details

Methods

arbitrary ∷ Gen Tx Source #

shrink ∷ Tx → [Tx] Source #

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

Methods

arbitrary ∷ Gen (Header (SimpleBlock c ext)) Source #

shrink ∷ Header (SimpleBlock c ext) → [Header (SimpleBlock c ext)] Source #

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

Methods

arbitrary ∷ Gen (AnnTip (SimpleBlock c ext)) Source #

shrink ∷ AnnTip (SimpleBlock c ext) → [AnnTip (SimpleBlock c ext)] Source #

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

Methods

arbitrary ∷ Gen (SomeBlockQuery (BlockQuery (SimpleBlock c ext))) Source #

shrink ∷ SomeBlockQuery (BlockQuery (SimpleBlock c ext)) → [SomeBlockQuery (BlockQuery (SimpleBlock c ext))] Source #

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

Methods

arbitrary ∷ Gen (GenTx (SimpleBlock c ext)) Source #

shrink ∷ GenTx (SimpleBlock c ext) → [GenTx (SimpleBlock c ext)] Source #

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

Methods

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

shrink ∷ TxId (GenTx (SimpleBlock c ext)) → [TxId (GenTx (SimpleBlock c ext))] Source #

(SimpleCrypto c, Arbitrary ext, Serialise ext, Typeable 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)) Source #

shrink ∷ Coherent (SimpleBlock c ext) → [Coherent (SimpleBlock c ext)] Source #

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

Methods

arbitrary ∷ Gen (SomeResult (SimpleBlock c ext)) Source #

shrink ∷ SomeResult (SimpleBlock c ext) → [SomeResult (SimpleBlock c ext)] Source #

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

Methods

arbitrary ∷ Gen (MockError blk) Source #

shrink ∷ MockError blk → [MockError blk] Source #

Arbitrary (MockState blk) Source # 
Instance details

Methods

arbitrary ∷ Gen (MockState blk) Source #

shrink ∷ MockState blk → [MockState blk] Source #

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

Methods

arbitrary ∷ Gen (LedgerState (SimpleBlock c ext) EmptyMK) Source #

shrink ∷ LedgerState (SimpleBlock c ext) EmptyMK → [LedgerState (SimpleBlock c ext) EmptyMK] Source #

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

Methods

arbitrary ∷ Gen (LedgerState (SimpleBlock c ext) ValuesMK) Source #

shrink ∷ LedgerState (SimpleBlock c ext) ValuesMK → [LedgerState (SimpleBlock c ext) ValuesMK] Source #

Arbitrary (LedgerTables (SimpleBlock c ext) ValuesMK) Source # 
Instance details

Methods

arbitrary ∷ Gen (LedgerTables (SimpleBlock c ext) ValuesMK) Source #

shrink ∷ LedgerTables (SimpleBlock c ext) ValuesMK → [LedgerTables (SimpleBlock c ext) ValuesMK] Source #

Arbitrary (BftFields BftMockCrypto toSign) Source # 
Instance details

(SimpleCrypto c, Arbitrary ext, Serialise ext, Typeable 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) Source #

shrink ∷ SimpleBlock c ext → [SimpleBlock c ext] Source #

Arbitrary (MockLedgerConfig c ext) ⇒ Arbitrary (SimpleLedgerConfig c ext) Source # 
Instance details

Methods

arbitrary ∷ Gen (SimpleLedgerConfig c ext) Source #

shrink ∷ SimpleLedgerConfig c ext → [SimpleLedgerConfig c ext] Source #

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

Methods

arbitrary ∷ Gen (SimpleStdHeader c ext) Source #

shrink ∷ SimpleStdHeader c ext → [SimpleStdHeader c ext] Source #

Arbitrary (SimpleBftExt c BftMockCrypto) Source # 
Instance details

Methods

arbitrary ∷ Gen (SimpleBftExt c BftMockCrypto) Source #

shrink ∷ SimpleBftExt c BftMockCrypto → [SimpleBftExt c BftMockCrypto] Source #

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

Methods

arbitrary ∷ Gen (ChainHash blk) Source #

shrink ∷ ChainHash blk → [ChainHash blk] Source #

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

Methods

arbitrary ∷ Gen (Point blk) Source #

shrink ∷ Point blk → [Point blk] Source #

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

Methods

arbitrary ∷ Gen (SomeSecond (NestedCtxt Header) (SimpleBlock c ext)) Source #

shrink ∷ SomeSecond (NestedCtxt Header) (SimpleBlock c ext) → [SomeSecond (NestedCtxt Header) (SimpleBlock c ext)] Source #