ouroboros-consensus-0.18.0.0: Consensus layer for the Ouroboros blockchain protocol
Safe HaskellSafe-Inferred
LanguageHaskell2010

Ouroboros.Consensus.Mempool.Init

Description

Creating a mempool

Synopsis

Documentation

openMempool ∷ (IOLike m, LedgerSupportsMempool blk, HasTxId (GenTx blk), ValidateEnvelope blk) ⇒ ResourceRegistry m → LedgerInterface m blk → LedgerConfig blk → MempoolCapacityBytesOverrideTracer m (TraceEventMempool blk) → (GenTx blk → TxSizeInBytes) → m (Mempool m blk) Source #

Create a Mempool m blk in m to manipulate the mempool. It will also fork a thread that syncs the mempool and the ledger when the ledger changes.

openMempoolWithoutSyncThread ∷ (IOLike m, LedgerSupportsMempool blk, HasTxId (GenTx blk), ValidateEnvelope blk) ⇒ LedgerInterface m blk → LedgerConfig blk → MempoolCapacityBytesOverrideTracer m (TraceEventMempool blk) → (GenTx blk → TxSizeInBytes) → m (Mempool m blk) Source #

Unlike openMempool, this function does not fork a background thread that synchronises with the ledger state whenever the later changes.

Intended for testing purposes.