ouroboros-network-0.16.0.0: A networking layer for the Ouroboros blockchain protocol
Safe HaskellSafe-Inferred
LanguageHaskell2010

Ouroboros.Network.TxSubmission.Mempool.Reader

Synopsis

Documentation

data TxSubmissionMempoolReader txid tx idx m Source #

The consensus layer functionality that the inbound and outbound side of the tx submission logic requires.

This is provided to the tx submission logic by the consensus layer.

Constructors

TxSubmissionMempoolReader 

Fields

data MempoolSnapshot txid tx idx Source #

A pure snapshot of the contents of the mempool. It allows fetching information about transactions in the mempool, and fetching individual transactions.

This uses a transaction sequence number type for identifying transactions within the mempool sequence. The sequence number is local to this mempool, unlike the transaction hash. This allows us to ask for all transactions after a known sequence number, to get new transactions. It is also used to look up individual transactions.

Note that it is expected that mempoolLookupTx will often return Nothing even for tx sequence numbers returned in previous snapshots. This happens when the transaction has been removed from the mempool between snapshots.

Constructors

MempoolSnapshot 

Fields

mapMempoolSnapshot ∷ (tx → tx') → MempoolSnapshot txid tx idx → MempoolSnapshot txid tx' idx Source #

mapTxSubmissionMempoolReaderMonadSTM m ⇒ (tx → tx') → TxSubmissionMempoolReader txid tx idx m → TxSubmissionMempoolReader txid tx' idx m Source #