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

Ouroboros.Consensus.Protocol.Ledger.Util

Description

Assorted utility functions for Shelley protocol integration.

In particular, various things we need for integration with the delegation package from cardano-ledger-specs.

Synopsis

Documentation

firstSlotOfEpochOfSlotEpochInfo IdentitySlotNoSlotNo Source #

Return the first slot in the epoch of the given slot.

isNewEpoch Source #

Arguments

EpochInfo Identity 
WithOrigin SlotNo

Slot we are comparing a new epoch against

SlotNo

Slot we want to check

Bool 

Verify whether a slot represents a change to a new epoch with regard to some other slot.

PRECONDITION: the two slots must be in the same era.