Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Injecting a transaction from one block type to another
Synopsis
- data InjectPolyTx tx blk blk' = InjectPolyTx {
- injectTxWith ∷ tx blk → Maybe (tx blk')
- cannotInjectPolyTx ∷ InjectPolyTx tx blk blk'
- matchPolyTx ∷ SListI xs ⇒ InPairs (InjectPolyTx tx) xs → NS tx xs → HardForkState f xs → Either (Mismatch tx (Current f) xs) (HardForkState (Product tx f) xs)
- matchPolyTxsNS ∷ ∀ tx f xs. SListI xs ⇒ InPairs (InjectPolyTx tx) xs → NS f xs → [NS tx xs] → ([Mismatch tx f xs], NS (Product f (List :.: tx)) xs)
- type InjectTx = InjectPolyTx GenTx
- cannotInjectTx ∷ InjectTx blk blk'
- matchTx ∷ SListI xs ⇒ InPairs InjectTx xs → NS GenTx xs → HardForkState f xs → Either (Mismatch GenTx (Current f) xs) (HardForkState (Product GenTx f) xs)
- pattern InjectTx ∷ (GenTx blk → Maybe (GenTx blk')) → InjectTx blk blk'
- type InjectValidatedTx = InjectPolyTx WrapValidatedGenTx
- cannotInjectValidatedTx ∷ InjectValidatedTx blk blk'
- matchValidatedTx ∷ SListI xs ⇒ InPairs InjectValidatedTx xs → NS WrapValidatedGenTx xs → HardForkState f xs → Either (Mismatch WrapValidatedGenTx (Current f) xs) (HardForkState (Product WrapValidatedGenTx f) xs)
- matchValidatedTxsNS ∷ ∀ f xs. SListI xs ⇒ InPairs InjectValidatedTx xs → NS f xs → [NS WrapValidatedGenTx xs] → ([Mismatch WrapValidatedGenTx f xs], NS (Product f (List :.: WrapValidatedGenTx)) xs)
- pattern InjectValidatedTx ∷ (WrapValidatedGenTx blk → Maybe (WrapValidatedGenTx blk')) → InjectValidatedTx blk blk'
Polymorphic
data InjectPolyTx tx blk blk' Source #
tx
is either GenTx
or WrapValidatedGenTx
See InjectTx
and InjectValidatedTx
, respectively.
InjectPolyTx | |
|
cannotInjectPolyTx ∷ InjectPolyTx tx blk blk' Source #
The injection that always fails
matchPolyTx ∷ SListI xs ⇒ InPairs (InjectPolyTx tx) xs → NS tx xs → HardForkState f xs → Either (Mismatch tx (Current f) xs) (HardForkState (Product tx f) xs) Source #
matchPolyTxsNS ∷ ∀ tx f xs. SListI xs ⇒ InPairs (InjectPolyTx tx) xs → NS f xs → [NS tx xs] → ([Mismatch tx f xs], NS (Product f (List :.: tx)) xs) Source #
Match a list of transactions with an NS
, attempting to inject where
possible
Unvalidated transactions
type InjectTx = InjectPolyTx GenTx Source #
cannotInjectTx ∷ InjectTx blk blk' Source #
cannotInjectPolyTx
at type InjectTx
matchTx ∷ SListI xs ⇒ InPairs InjectTx xs → NS GenTx xs → HardForkState f xs → Either (Mismatch GenTx (Current f) xs) (HardForkState (Product GenTx f) xs) Source #
matchPolyTx
at type InjectTx
pattern InjectTx ∷ (GenTx blk → Maybe (GenTx blk')) → InjectTx blk blk' Source #
InjectPolyTx
at type InjectTx
Validated transactions
cannotInjectValidatedTx ∷ InjectValidatedTx blk blk' Source #
cannotInjectPolyTx
at type InjectValidatedTx
matchValidatedTx ∷ SListI xs ⇒ InPairs InjectValidatedTx xs → NS WrapValidatedGenTx xs → HardForkState f xs → Either (Mismatch WrapValidatedGenTx (Current f) xs) (HardForkState (Product WrapValidatedGenTx f) xs) Source #
matchPolyTx
at type InjectValidatedTx
matchValidatedTxsNS ∷ ∀ f xs. SListI xs ⇒ InPairs InjectValidatedTx xs → NS f xs → [NS WrapValidatedGenTx xs] → ([Mismatch WrapValidatedGenTx f xs], NS (Product f (List :.: WrapValidatedGenTx)) xs) Source #
matchPolyTxsNS
at type InjectValidatedTx
pattern InjectValidatedTx ∷ (WrapValidatedGenTx blk → Maybe (WrapValidatedGenTx blk')) → InjectValidatedTx blk blk' Source #
InjectPolyTx
at type InjectValidatedTx