Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Mempool with a mocked ledger interface
Synopsis
- data InitialMempoolAndModelParams blk = MempoolAndModelParams {
- immpInitialState ∷ !(LedgerState blk)
- immpLedgerConfig ∷ !(LedgerConfig blk)
- data MockedMempool m blk
- openMockedMempool ∷ (LedgerSupportsMempool blk, HasTxId (GenTx blk), ValidateEnvelope blk) ⇒ MempoolCapacityBytesOverride → Tracer IO (TraceEventMempool blk) → InitialMempoolAndModelParams blk → IO (MockedMempool IO blk)
- setLedgerState ∷ MockedMempool IO blk → LedgerState blk → IO ()
- addTx ∷ MockedMempool m blk → AddTxOnBehalfOf → GenTx blk → m (MempoolAddTxResult blk)
- getTxs ∷ ∀ blk. LedgerSupportsMempool blk ⇒ MockedMempool IO blk → IO [GenTx blk]
- removeTxs ∷ MockedMempool m blk → [GenTxId blk] → m ()
Documentation
data InitialMempoolAndModelParams blk Source #
MempoolAndModelParams | |
|
Mempool with a mocked LedgerDB interface
data MockedMempool m blk Source #
Instances
NFData (MockedMempool m blk) Source # | |
Defined in Test.Consensus.Mempool.Mocked rnf ∷ MockedMempool m blk → () # |
openMockedMempool ∷ (LedgerSupportsMempool blk, HasTxId (GenTx blk), ValidateEnvelope blk) ⇒ MempoolCapacityBytesOverride → Tracer IO (TraceEventMempool blk) → InitialMempoolAndModelParams blk → IO (MockedMempool IO blk) Source #
setLedgerState ∷ MockedMempool IO blk → LedgerState blk → IO () Source #
Mempool API functions
addTx ∷ MockedMempool m blk → AddTxOnBehalfOf → GenTx blk → m (MempoolAddTxResult blk) Source #
getTxs ∷ ∀ blk. LedgerSupportsMempool blk ⇒ MockedMempool IO blk → IO [GenTx blk] Source #
removeTxs ∷ MockedMempool m blk → [GenTxId blk] → m () Source #