ouroboros-consensus-0.1.0.1: Consensus layer for the Ouroboros blockchain protocol
Safe Haskell None
Language Haskell2010

Ouroboros.Consensus.Fragment.ValidatedDiff

Description

Intended for qualified import

import Ouroboros.Consensus.Fragment.ValidatedDiff (ValidatedChainDiff (..))
import qualified Ouroboros.Consensus.Fragment.ValidatedDiff as ValidatedDiff
Synopsis

Documentation

data ValidatedChainDiff b l where Source #

A ChainDiff along with the ledger state after validation.

INVARIANT:

getTip chainDiff == ledgerTipPoint ledger

Bundled Patterns

pattern ValidatedChainDiff :: ChainDiff b -> l -> ValidatedChainDiff b l

Allow for pattern matching on a ValidatedChainDiff without exposing the (unsafe) constructor. Use new to construct a ValidatedChainDiff .

new :: forall b l. ( IsLedger l, HasHeader b, HeaderHash l ~ HeaderHash b, HasCallStack ) => ChainDiff b -> l -> ValidatedChainDiff b l Source #

Create a ValidatedChainDiff .

PRECONDITION:

getTip chainDiff == ledgerTipPoint ledger