Safe Haskell | None |
---|---|
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 :: k) (reject :: k1) where
- StIdle :: forall {k} {k1} (tx :: k) (reject :: k1). LocalTxSubmission tx reject
- StBusy :: forall {k} {k1} (tx :: k) (reject :: k1). LocalTxSubmission tx reject
- StDone :: forall {k} {k1} (tx :: k) (reject :: k1). LocalTxSubmission tx reject
- data SingLocalTxSubmission (k2 :: LocalTxSubmission tx rejct) where
- SingIdle :: forall {k} {k1} {tx :: k} {rejct :: k1}. SingLocalTxSubmission ('StIdle :: LocalTxSubmission tx rejct)
- SingBusy :: forall {k} {k1} {tx :: k} {rejct :: k1}. SingLocalTxSubmission ('StBusy :: LocalTxSubmission tx rejct)
- SingDone :: forall {k} {k1} {tx :: k} {rejct :: k1}. SingLocalTxSubmission ('StDone :: LocalTxSubmission tx rejct)
- data SubmitResult reason
- = SubmitSuccess
- | SubmitFail reason
Documentation
data LocalTxSubmission (tx :: k) (reject :: k1) 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 :: forall {k} {k1} (tx :: k) (reject :: k1). LocalTxSubmission tx reject | The client has agency; it can submit a transaction or terminate. There is no timeout in this state. |
StBusy :: forall {k} {k1} (tx :: k) (reject :: k1). 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 {k} {k1} (tx :: k) (reject :: k1). LocalTxSubmission tx reject | Nobody has agency. The terminal state. |
Instances
data SingLocalTxSubmission (k2 :: LocalTxSubmission tx rejct) where Source #
SingIdle :: forall {k} {k1} {tx :: k} {rejct :: k1}. SingLocalTxSubmission ('StIdle :: LocalTxSubmission tx rejct) | |
SingBusy :: forall {k} {k1} {tx :: k} {rejct :: k1}. SingLocalTxSubmission ('StBusy :: LocalTxSubmission tx rejct) | |
SingDone :: forall {k} {k1} {tx :: k} {rejct :: k1}. SingLocalTxSubmission ('StDone :: LocalTxSubmission tx rejct) |
Instances
Show (SingLocalTxSubmission k3) Source # | |
Defined in Ouroboros.Network.Protocol.LocalTxSubmission.Type showsPrec :: Int -> SingLocalTxSubmission k3 -> ShowS # show :: SingLocalTxSubmission k3 -> String # showList :: [SingLocalTxSubmission k3] -> ShowS # |
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 # (<$) :: a -> SubmitResult b -> SubmitResult a # | |
Eq reason => Eq (SubmitResult reason) Source # | |
Defined in Ouroboros.Network.Protocol.LocalTxSubmission.Type (==) :: SubmitResult reason -> SubmitResult reason -> Bool # (/=) :: SubmitResult reason -> SubmitResult reason -> Bool # |