ouroboros-consensus-0.26.0.0: Consensus layer for the Ouroboros blockchain protocol
Safe HaskellNone
LanguageHaskell2010

Ouroboros.Consensus.HardFork.Combinator.InjectTxs

Description

Injecting a transaction from one block type to another

Synopsis

Polymorphic

data InjectPolyTx (tx ∷ TypeType) blk blk' Source #

tx is either GenTx or WrapValidatedGenTx

See InjectTx and InjectValidatedTx, respectively.

Constructors

InjectPolyTx 

Fields

cannotInjectPolyTx ∷ ∀ (tx ∷ TypeType) blk blk'. InjectPolyTx tx blk blk' Source #

The injection that always fails

matchPolyTx ∷ ∀ (xs ∷ [Type]) (tx ∷ TypeType) (f ∷ TypeType). SListI xs ⇒ InPairs (InjectPolyTx tx) xs → NS tx xs → HardForkState f xs → Either (Mismatch tx (Current f) xs) (HardForkState (Product tx f) xs) Source #

matchPolyTxsTele ∷ ∀ (tx ∷ TypeType) (g ∷ TypeType) (f ∷ TypeType) (xs ∷ [Type]). SListI xs ⇒ InPairs (InjectPolyTx tx) xs → Telescope g f xs → [NS tx xs] → ([(NS tx xs, Mismatch tx f xs)], Telescope g (Product f ([] :.: tx)) xs) Source #

Match a list of transactions with an Telescope, attempting to inject where possible

Unvalidated transactions

matchTx ∷ ∀ (xs ∷ [Type]) (f ∷ TypeType). SListI xs ⇒ InPairs InjectTx xs → NS GenTx xs → HardForkState f xs → Either (Mismatch GenTx (Current f) xs) (HardForkState (Product GenTx f) xs) Source #

pattern InjectTx ∷ (GenTx blk → Maybe (GenTx blk')) → InjectTx blk blk' Source #

Validated transactions

matchValidatedTxsNS ∷ ∀ (f ∷ TypeType) (xs ∷ [Type]). SListI xs ⇒ InPairs InjectValidatedTx xs → NS f xs → [NS WrapValidatedGenTx xs] → ([Mismatch WrapValidatedGenTx f xs], NS (Product f ([] :.: WrapValidatedGenTx)) xs) Source #

matchPolyTxsNS at type InjectValidatedTx