ouroboros-consensus-protocol-0.1.0.1: Cardano consensus protocols.
Safe Haskell None
Language Haskell2010

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

firstSlotOfEpochOfSlot :: EpochInfo Identity -> SlotNo -> SlotNo 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.