| 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
- data ValidatedChainDiff b l where
- pattern ValidatedChainDiff :: ChainDiff b -> l -> ValidatedChainDiff b l
- getChainDiff :: ValidatedChainDiff b l -> ChainDiff b
- getLedger :: ValidatedChainDiff b l -> l
- new :: forall b l. (IsLedger l, HasHeader b, HeaderHash l ~ HeaderHash b, HasCallStack) => ChainDiff b -> l -> ValidatedChainDiff b l
- toValidatedFragment :: (IsLedger l, HasHeader b, HeaderHash l ~ HeaderHash b, HasCallStack) => ValidatedChainDiff b l -> ValidatedFragment b l
- rollbackExceedsSuffix :: HasHeader b => ValidatedChainDiff b l -> Bool
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 |
getChainDiff :: ValidatedChainDiff b l -> ChainDiff b Source #
getLedger :: ValidatedChainDiff b l -> l Source #
new :: forall b l. (IsLedger l, HasHeader b, HeaderHash l ~ HeaderHash b, HasCallStack) => ChainDiff b -> l -> ValidatedChainDiff b l Source #
toValidatedFragment :: (IsLedger l, HasHeader b, HeaderHash l ~ HeaderHash b, HasCallStack) => ValidatedChainDiff b l -> ValidatedFragment b l Source #
rollbackExceedsSuffix :: HasHeader b => ValidatedChainDiff b l -> Bool Source #