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

Ouroboros.Consensus.HardFork.Combinator.Compat

Synopsis

Documentation

data HardForkCompatQuery blk :: Type -> Type where Source #

Version of Query (HardForkBlock xs) without the restriction to have at least two eras

Convenience constructors

compatGetInterpreter :: HardForkCompatQuery blk ( Interpreter ( HardForkIndices blk)) Source #

Get an interpreter for history queries

I.e., this can be used for slot epoch time conversions.

compatIfCurrent :: BlockQuery blk result -> HardForkCompatQuery blk result Source #

Submit query to underlying ledger

Wrappers

forwardCompatQuery Source #

Arguments

:: forall m x xs. IsNonEmpty xs
=> ( forall result. BlockQuery ( HardForkBlock (x ': xs)) result -> m result)

Submit a query through the LocalStateQuery protocol.

-> forall result. HardForkCompatQuery ( HardForkBlock (x ': xs)) result -> m result

Wrapper used when connecting to a server that's running the HFC with at least two eras

singleEraCompatQuery Source #

Arguments

:: forall m blk era. ( Monad m, HardForkIndices blk ~ '[era])
=> EpochSize
-> SlotLength
-> ( forall result. BlockQuery blk result -> m result)

Submit a query through the LocalStateQuery protocol.

-> forall result. HardForkCompatQuery blk result -> m result

Wrapper used when connecting to a server that's not using the HFC, or is using the HFC but with a single era only.