Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Creating a mempool
Synopsis
- openMempool ∷ (IOLike m, LedgerSupportsMempool blk, HasTxId (GenTx blk), ValidateEnvelope blk) ⇒ ResourceRegistry m → LedgerInterface m blk → LedgerConfig blk → MempoolCapacityBytesOverride → Tracer m (TraceEventMempool blk) → m (Mempool m blk)
- openMempoolWithoutSyncThread ∷ (IOLike m, LedgerSupportsMempool blk, HasTxId (GenTx blk), ValidateEnvelope blk) ⇒ LedgerInterface m blk → LedgerConfig blk → MempoolCapacityBytesOverride → Tracer m (TraceEventMempool blk) → m (Mempool m blk)
Documentation
openMempool ∷ (IOLike m, LedgerSupportsMempool blk, HasTxId (GenTx blk), ValidateEnvelope blk) ⇒ ResourceRegistry m → LedgerInterface m blk → LedgerConfig blk → MempoolCapacityBytesOverride → Tracer m (TraceEventMempool blk) → 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 → MempoolCapacityBytesOverride → Tracer m (TraceEventMempool blk) → 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.