Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data MempoolCmd blk = AddTx (GenTx blk)
- getCmdTx ∷ MempoolCmd blk → Maybe (GenTx blk)
- getCmdTxId ∷ HasTxId (GenTx blk) ⇒ MempoolCmd blk → Maybe (TxId (GenTx blk))
- getCmdsTxIds ∷ HasTxId (GenTx blk) ⇒ [MempoolCmd blk] → [TxId (GenTx blk)]
- getCmdsTxs ∷ [MempoolCmd blk] → [GenTx blk]
- run ∷ Monad m ⇒ MockedMempool m blk → [MempoolCmd blk] → m ()
Commands
data MempoolCmd blk Source #
AddTx (GenTx blk) | Add a transaction. NB: if the mempool is full, the execution of this command will block until the mempool has at least one byte free. As a consenquence, if these commands are run sequentially the benchmarks or tests will deadlock if the maxium mempool capacity is reached. |
Instances
Generic (MempoolCmd blk) Source # | |
Defined in Bench.Consensus.Mempool type Rep (MempoolCmd blk) ∷ Type → Type # from ∷ MempoolCmd blk → Rep (MempoolCmd blk) x # to ∷ Rep (MempoolCmd blk) x → MempoolCmd blk # | |
NFData (GenTx blk) ⇒ NFData (MempoolCmd blk) Source # | |
Defined in Bench.Consensus.Mempool rnf ∷ MempoolCmd blk → () # | |
type Rep (MempoolCmd blk) Source # | |
Defined in Bench.Consensus.Mempool type Rep (MempoolCmd blk) = D1 ('MetaData "MempoolCmd" "Bench.Consensus.Mempool" "ouroboros-consensus-0.21.0.0-inplace-mempool-bench" 'False) (C1 ('MetaCons "AddTx" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (GenTx blk)))) |
Queries on commands
getCmdTxId ∷ HasTxId (GenTx blk) ⇒ MempoolCmd blk → Maybe (TxId (GenTx blk)) Source #
getCmdsTxIds ∷ HasTxId (GenTx blk) ⇒ [MempoolCmd blk] → [TxId (GenTx blk)] Source #
getCmdsTxs ∷ [MempoolCmd blk] → [GenTx blk] Source #
Commands execution
run ∷ Monad m ⇒ MockedMempool m blk → [MempoolCmd blk] → m () Source #