ouroboros-consensus-0.21.0.0: Consensus layer for the Ouroboros blockchain protocol
Safe HaskellSafe-Inferred
LanguageHaskell2010

Ouroboros.Consensus.MiniProtocol.BlockFetch.ClientInterface

Description

Initialization of the BlockFetchConsensusInterface

Synopsis

Documentation

data ChainDbView m blk Source #

Abstract over the ChainDB

type SlotForgeTimeOracle m blk = RealPoint blk → STM m UTCTime Source #

How to get the wall-clock time of a slot. Note that this is a very non-trivial operation in the context of the HFC, cf. headerForgeUTCTime.

initSlotForgeTimeOracle ∷ ∀ m blk. (IOLike m, BlockSupportsProtocol blk, HasHardForkHistory blk, ConfigSupportsNode blk, IsLedger (LedgerState blk)) ⇒ TopLevelConfig blk → ChainDB m blk → m (SlotForgeTimeOracle m blk) Source #

Create a HFC-enabled SlotForgeTimeOracle. Note that its semantics are rather tricky, cf. headerForgeUTCTime.