ouroboros-network-0.1.0.1: A networking layer for the Ouroboros blockchain protocol
Safe Haskell None
Language Haskell2010

Ouroboros.Network.TxSubmission.Inbound

Synopsis

Documentation

txSubmissionInbound Source #

Arguments

:: forall txid tx idx m. ( Ord txid, NoThunks txid, NoThunks tx, MonadSTM m, MonadThrow m)
=> Tracer m ( TraceTxSubmissionInbound txid tx)
-> Word16

Maximum number of unacknowledged txids allowed

-> TxSubmissionMempoolReader txid tx idx m
-> TxSubmissionMempoolWriter txid tx idx m
-> NodeToNodeVersion
-> TxSubmissionServerPipelined txid tx m ()

data TxSubmissionMempoolWriter txid tx idx m Source #

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

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

Constructors

TxSubmissionMempoolWriter

Fields

  • txId :: tx -> txid

    Compute the transaction id from a transaction.

    This is used in the protocol handler to verify a full transaction matches a previously given transaction id.

  • mempoolAddTxs :: [tx] -> m [txid]

    Supply a batch of transactions to the mempool. They are either accepted or rejected individually, but in the order supplied.

    The txid s of all transactions that were added successfully are returned.