Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data MockConfig = MockConfig {}
- defaultMockConfig ∷ MockConfig
- data MockError blk
- = MockExpired !SlotNo !SlotNo
- | MockUtxoError UtxoError
- | MockInvalidHash (ChainHash blk) (ChainHash blk)
- | MockTxSizeTooBig ByteSize32 ByteSize32
- data MockState blk = MockState {}
- updateMockState ∷ (GetPrevHash blk, HasMockTxs blk) ⇒ MockConfig → blk → MockState blk → Except (MockError blk) (MockState blk)
- updateMockTip ∷ GetPrevHash blk ⇒ Header blk → MockState blk → Except (MockError blk) (MockState blk)
- updateMockUTxO ∷ HasMockTxs a ⇒ MockConfig → SlotNo → a → MockState blk → Except (MockError blk) (MockState blk)
- checkTxSize ∷ MockConfig → Tx → Except (MockError blk) ByteSize32
- txSize ∷ Tx → ByteSize32
- genesisMockState ∷ AddrDist → MockState blk
Config for the mock ledger
data MockConfig Source #
Parameters needed to validate blocks/txs
Instances
Generic MockConfig Source # | |
Defined in Ouroboros.Consensus.Mock.Ledger.State type Rep MockConfig ∷ Type → Type # from ∷ MockConfig → Rep MockConfig x # to ∷ Rep MockConfig x → MockConfig # | |
Show MockConfig Source # | |
Defined in Ouroboros.Consensus.Mock.Ledger.State | |
Eq MockConfig Source # | |
Defined in Ouroboros.Consensus.Mock.Ledger.State (==) ∷ MockConfig → MockConfig → Bool # (/=) ∷ MockConfig → MockConfig → Bool # | |
NoThunks MockConfig Source # | |
Defined in Ouroboros.Consensus.Mock.Ledger.State | |
type Rep MockConfig Source # | |
Defined in Ouroboros.Consensus.Mock.Ledger.State type Rep MockConfig = D1 ('MetaData "MockConfig" "Ouroboros.Consensus.Mock.Ledger.State" "ouroboros-consensus-0.21.0.0-inplace-unstable-mock-block" 'False) (C1 ('MetaCons "MockConfig" 'PrefixI 'True) (S1 ('MetaSel ('Just "mockCfgMaxTxSize") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe ByteSize32)))) |
State of the mock ledger
MockExpired !SlotNo !SlotNo | The transaction expired in the first |
MockUtxoError UtxoError | |
MockInvalidHash (ChainHash blk) (ChainHash blk) | |
MockTxSizeTooBig ByteSize32 ByteSize32 |
Instances
Instances
Generic (MockState blk) Source # | |
StandardHash blk ⇒ Show (MockState blk) Source # | |
StandardHash blk ⇒ Eq (MockState blk) Source # | |
StandardHash blk ⇒ NoThunks (MockState blk) Source # | |
Serialise (HeaderHash blk) ⇒ Serialise (MockState blk) Source # | |
type Rep (MockState blk) Source # | |
Defined in Ouroboros.Consensus.Mock.Ledger.State type Rep (MockState blk) = D1 ('MetaData "MockState" "Ouroboros.Consensus.Mock.Ledger.State" "ouroboros-consensus-0.21.0.0-inplace-unstable-mock-block" 'False) (C1 ('MetaCons "MockState" 'PrefixI 'True) (S1 ('MetaSel ('Just "mockUtxo") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Utxo) :*: (S1 ('MetaSel ('Just "mockConfirmed") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Set TxId)) :*: S1 ('MetaSel ('Just "mockTip") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Point blk))))) |
updateMockState ∷ (GetPrevHash blk, HasMockTxs blk) ⇒ MockConfig → blk → MockState blk → Except (MockError blk) (MockState blk) Source #
updateMockTip ∷ GetPrevHash blk ⇒ Header blk → MockState blk → Except (MockError blk) (MockState blk) Source #
updateMockUTxO ∷ HasMockTxs a ⇒ MockConfig → SlotNo → a → MockState blk → Except (MockError blk) (MockState blk) Source #
Supporting definitions
checkTxSize ∷ MockConfig → Tx → Except (MockError blk) ByteSize32 Source #
txSize ∷ Tx → ByteSize32 Source #
Genesis state
genesisMockState ∷ AddrDist → MockState blk Source #