Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
The type of the local transaction submission protocol.
This is used by local clients (like wallets and CLI tools) to submit transactions to a local node.
Synopsis
-
data
LocalTxSubmission
tx reject
where
- StIdle :: LocalTxSubmission tx reject
- StBusy :: LocalTxSubmission tx reject
- StDone :: LocalTxSubmission tx reject
-
data
SubmitResult
reason
- = SubmitSuccess
- | SubmitFail reason
Documentation
data LocalTxSubmission tx reject where Source #
The kind of the local transaction-submission protocol, and the types of the states in the protocol state machine.
It is parametrised over the type of transactions and the type of reasons used when rejecting a transaction.
StIdle :: LocalTxSubmission tx reject |
The client has agency; it can submit a transaction or terminate. There is no timeout in this state. |
StBusy :: LocalTxSubmission tx reject |
The server has agency; it must process the submitted transaction and either accept or reject it (with a reason). There is a timeout in this state. If the mempool is full and remains so for a period then the transaction should be rejected with a suitable temporary failure reason. |
StDone :: LocalTxSubmission tx reject |
Nobody has agency. The terminal state. |
Instances
data SubmitResult reason Source #
Isomorphic with Maybe but with a name that better describes its purpose and usage.
SubmitSuccess | |
SubmitFail reason |
Instances
Functor SubmitResult Source # | |
Defined in Ouroboros.Network.Protocol.LocalTxSubmission.Type fmap :: (a -> b) -> SubmitResult a -> SubmitResult b Source # (<$) :: a -> SubmitResult b -> SubmitResult a Source # |
|
Eq reason => Eq ( SubmitResult reason) Source # | |
Defined in Ouroboros.Network.Protocol.LocalTxSubmission.Type (==) :: SubmitResult reason -> SubmitResult reason -> Bool Source # (/=) :: SubmitResult reason -> SubmitResult reason -> Bool Source # |