ouroboros-consensus-protocol-0.1.0.0: Cardano consensus protocols.

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

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

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.