| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Ouroboros.Network.Protocol.LocalTxSubmission.Type
Description
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 :: forall tx reject. LocalTxSubmission tx reject
- StBusy :: forall tx reject. LocalTxSubmission tx reject
- StDone :: forall tx reject. LocalTxSubmission tx reject
- data SingLocalTxSubmission (k :: LocalTxSubmission tx rejct) where
- SingIdle :: forall {tx} {rejct}. SingLocalTxSubmission ('StIdle :: LocalTxSubmission tx rejct)
- SingBusy :: forall {tx} {rejct}. SingLocalTxSubmission ('StBusy :: LocalTxSubmission tx rejct)
- SingDone :: forall {tx} {rejct}. SingLocalTxSubmission ('StDone :: LocalTxSubmission tx rejct)
- 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 parameterised over the type of transactions and the type of reasons used when rejecting a transaction.
Constructors
| StIdle :: forall tx reject. LocalTxSubmission tx reject | The client has agency; it can submit a transaction or terminate. There is no timeout in this state. |
| StBusy :: forall tx reject. 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 :: forall tx reject. LocalTxSubmission tx reject | Nobody has agency. The terminal state. |
Instances
data SingLocalTxSubmission (k :: LocalTxSubmission tx rejct) where Source #
Constructors
| SingIdle :: forall {tx} {rejct}. SingLocalTxSubmission ('StIdle :: LocalTxSubmission tx rejct) | |
| SingBusy :: forall {tx} {rejct}. SingLocalTxSubmission ('StBusy :: LocalTxSubmission tx rejct) | |
| SingDone :: forall {tx} {rejct}. SingLocalTxSubmission ('StDone :: LocalTxSubmission tx rejct) |
Instances
| Show (SingLocalTxSubmission k) Source # | |
Defined in Ouroboros.Network.Protocol.LocalTxSubmission.Type Methods showsPrec :: Int -> SingLocalTxSubmission k -> ShowS # show :: SingLocalTxSubmission k -> String # showList :: [SingLocalTxSubmission k] -> ShowS # | |
data SubmitResult reason Source #
Isomorphic with Maybe but with a name that better describes its purpose and usage.
Constructors
| SubmitSuccess | |
| SubmitFail reason |
Instances
| Functor SubmitResult Source # | |
Defined in Ouroboros.Network.Protocol.LocalTxSubmission.Type Methods fmap :: (a -> b) -> SubmitResult a -> SubmitResult b # (<$) :: a -> SubmitResult b -> SubmitResult a # | |
| Eq reason => Eq (SubmitResult reason) Source # | |
Defined in Ouroboros.Network.Protocol.LocalTxSubmission.Type Methods (==) :: SubmitResult reason -> SubmitResult reason -> Bool # (/=) :: SubmitResult reason -> SubmitResult reason -> Bool # | |