Safe Haskell | None |
---|---|
Language | Haskell2010 |
Bench.Consensus.Mempool
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 #
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
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 #