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

Ouroboros.Network.Protocol.LocalTxSubmission.Server

Description

A view of the local transaction submission protocol from the point of view of the server.

This provides a view that uses less complex types and should be easier to use than the underlying typed protocol itself.

For execution, a conversion into the typed protocol is provided.

Synopsis

Protocol type for the server

The protocol states from the point of view of the server.

data LocalTxSubmissionServer tx reject m a Source #

The server side of the local transaction submission protocol.

The peer in the client role submits transactions to the peer in the server role.

Constructors

LocalTxSubmissionServer 

Fields

  • recvMsgSubmitTx ∷ tx → m (SubmitResult reject, LocalTxSubmissionServer tx reject m a)

    The client has submited a single transaction and it expects a reply.

    The server must reply to inform the client that it has either accepted the transaction or rejected it. In the rejection case a reason for the rejection is included.

  • recvMsgDone ∷ a

    The client can terminate the protocol.

Execution as a typed protocol

localTxSubmissionServerPeer ∷ ∀ tx reject m a. Monad m ⇒ m (LocalTxSubmissionServer tx reject m a) → Peer (LocalTxSubmission tx reject) AsServer StIdle m a Source #

A non-pipelined Peer representing the LocalTxSubmissionServer.