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

Ouroboros.Consensus.Mempool.Update

Description

Operations that update the mempool. They are internally divided in the pure and impure sides of the operation.

Synopsis

Documentation

implAddTx Source #

Arguments

∷ (MonadSTM m, MonadMVar m, LedgerSupportsMempool blk, HasTxId (GenTx blk)) 
StrictTVar m (InternalState blk)

The InternalState TVar.

MVar m ()

The FIFO for remote peers

MVar m ()

The FIFO for all remote peers and local clients

LedgerConfig blk

The configuration of the ledger.

→ (GenTx blk → TxSizeInBytes)

The function to calculate the size of a transaction.

Tracer m (TraceEventMempool blk) 
AddTxOnBehalfOf

Whether we're acting on behalf of a remote peer or a local client.

GenTx blk

The transaction to add to the mempool.

→ m (MempoolAddTxResult blk) 

Add a single transaction to the mempool, blocking if there is no space.

implRemoveTxs ∷ (IOLike m, LedgerSupportsMempool blk, HasTxId (GenTx blk), ValidateEnvelope blk) ⇒ MempoolEnv m blk → [GenTxId blk] → m () Source #