ouroboros-network
Safe HaskellNone
LanguageHaskell2010

Ouroboros.Network.TxSubmission.Mempool.Simple

Description

The module should be imported qualified.

Synopsis

Documentation

newtype Mempool (m :: Type -> Type) tx Source #

A simple in-memory mempool implementation.

Constructors

Mempool (StrictTVar m (Seq tx)) 

empty :: MonadSTM m => m (Mempool m tx) Source #

new :: MonadSTM m => [tx] -> m (Mempool m tx) Source #

read :: MonadSTM m => Mempool m tx -> m [tx] Source #

getReader :: forall tx txid (m :: Type -> Type). (MonadSTM m, Eq txid) => (tx -> txid) -> (tx -> SizeInBytes) -> Mempool m tx -> TxSubmissionMempoolReader txid tx Int m Source #

getWriter Source #

Arguments

:: forall tx txid (m :: Type -> Type). (MonadSTM m, Ord txid) 
=> (tx -> txid) 
-> (tx -> Bool)

validate a tx

-> Mempool m tx 
-> TxSubmissionMempoolWriter txid tx Int m 

A simple mempool writer.