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

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 ValidatedChainDiffChainDiff b → l → ValidatedChainDiff b l

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

new ∷ ∀ 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