ouroboros-network-protocols:testlib
Safe HaskellNone
LanguageHaskell2010

Ouroboros.Network.Protocol.LocalTxMonitor.Examples

Synopsis

Documentation

localTxMonitorClient :: forall txid tx slot (m :: Type -> Type). Applicative m => (tx -> txid) -> LocalTxMonitorClient txid tx slot m ([(tx, Bool)], MempoolSizeAndCapacity) Source #

An example client which acquire a snapshot from the server and fetches all transactions from it, and check presence of each of these transactions.

localTxMonitorServer :: forall txid tx slot (m :: Type -> Type). (Applicative m, Eq txid) => (tx -> txid) -> (slot, [tx]) -> LocalTxMonitorServer txid tx slot m () Source #

An example server which streams predefined transactions to a client. The preset is the only snapshot of the server, so acquiring/re-acquiring always yield the same transactions.