mempool-bench
Safe HaskellSafe-Inferred
LanguageHaskell2010

Bench.Consensus.Mempool

Synopsis

Commands

data MempoolCmd blk Source #

Constructors

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

Instances details
Generic (MempoolCmd blk) Source # 
Instance details

Defined in Bench.Consensus.Mempool

Associated Types

type Rep (MempoolCmd blk) ∷ TypeType #

Methods

fromMempoolCmd blk → Rep (MempoolCmd blk) x #

toRep (MempoolCmd blk) x → MempoolCmd blk #

NFData (GenTx blk) ⇒ NFData (MempoolCmd blk) Source # 
Instance details

Defined in Bench.Consensus.Mempool

Methods

rnfMempoolCmd blk → () #

type Rep (MempoolCmd blk) Source # 
Instance details

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 ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (GenTx blk))))

Queries on commands

getCmdTxIdHasTxId (GenTx blk) ⇒ MempoolCmd blk → Maybe (TxId (GenTx blk)) Source #

getCmdsTxIdsHasTxId (GenTx blk) ⇒ [MempoolCmd blk] → [TxId (GenTx blk)] Source #

getCmdsTxs ∷ [MempoolCmd blk] → [GenTx blk] Source #

Commands execution

runMonad m ⇒ MockedMempool m blk → [MempoolCmd blk] → m () Source #