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

Ouroboros.Consensus.Storage.ChainDB.Init

Description

Intended for qualified import

import Ouroboros.Consensus.Storage.ChainDB.Init (InitChainDB)
import qualified Ouroboros.Consensus.Storage.ChainDB.Init as InitChainDB
Synopsis

Documentation

newtype InitChainDB m blk Source #

Restricted interface to the ChainDB used on node initialization

Constructors

InitChainDB 

Fields

  • addBlockIfEmpty :: m blk -> m ()

    Add a block to the DB when the current chain is empty.

    The given action is only called when the current chain is empty.

Instances

Instances details
Functor m => Contravariant (InitChainDB m) Source # 
Instance details

Defined in Ouroboros.Consensus.Storage.ChainDB.Init

Methods

contramap :: (a -> b) -> InitChainDB m b -> InitChainDB m a #

(>$) :: b -> InitChainDB m b -> InitChainDB m a #

Functor m => Isomorphic (InitChainDB m) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Unary

fromFull :: IOLike m => ChainDB m blk -> InitChainDB m blk Source #

cast :: (Functor m, Coercible blk blk') => InitChainDB m blk -> InitChainDB m blk' Source #