ouroboros-consensus:unstable-consensus-testlib
Safe HaskellNone
LanguageHaskell2010

Test.Util.HardFork.Future

Synopsis

Documentation

newtype EraSize Source #

Number of epochs

Constructors

EraSize 

Fields

Instances

Instances details
Eq EraSize Source # 
Instance details

Defined in Test.Util.HardFork.Future

Methods

(==) ∷ EraSize → EraSize → Bool #

(/=) ∷ EraSize → EraSize → Bool #

Generic EraSize Source # 
Instance details

Defined in Test.Util.HardFork.Future

Associated Types

type Rep EraSize 
Instance details

Defined in Test.Util.HardFork.Future

type Rep EraSize = D1 ('MetaData "EraSize" "Test.Util.HardFork.Future" "ouroboros-consensus-4.0.0.0-inplace-unstable-consensus-testlib" 'True) (C1 ('MetaCons "EraSize" 'PrefixI 'True) (S1 ('MetaSel ('Just "unEraSize") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word64)))

Methods

from ∷ EraSize → Rep EraSize x #

to ∷ Rep EraSize x → EraSize #

Show EraSize Source # 
Instance details

Defined in Test.Util.HardFork.Future

Methods

showsPrec ∷ Int → EraSize → ShowS #

show ∷ EraSize → String #

showList ∷ [EraSize] → ShowS #

type Rep EraSize Source # 
Instance details

Defined in Test.Util.HardFork.Future

type Rep EraSize = D1 ('MetaData "EraSize" "Test.Util.HardFork.Future" "ouroboros-consensus-4.0.0.0-inplace-unstable-consensus-testlib" 'True) (C1 ('MetaCons "EraSize" 'PrefixI 'True) (S1 ('MetaSel ('Just "unEraSize") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word64)))

data Future Source #

Every era in the test

INVARIANT: every number is > 0

Instances

Instances details
Eq Future Source # 
Instance details

Defined in Test.Util.HardFork.Future

Methods

(==) ∷ Future → Future → Bool #

(/=) ∷ Future → Future → Bool #

Show Future Source # 
Instance details

Defined in Test.Util.HardFork.Future

Methods

showsPrec ∷ Int → Future → ShowS #

show ∷ Future → String #

showList ∷ [Future] → ShowS #

futureEpochInFirstEra ∷ Future → EpochNo → Bool Source #

Whether the epoch is in the first era

futureSlotLengths ∷ Future → Stream SlotLength Source #

Length of each slot in the whole Future

futureSlotToEpoch ∷ Future → SlotNo → EpochNo Source #

Which epoch the slot is in

futureSlotToTime ∷ Future → SlotNo → NominalDiffTime Source #

When the slot begins

futureTimeToSlot ∷ Future → NominalDiffTime → (SlotNo, NominalDiffTime, SlotLength) Source #

(slot, time left in slot, length of slot)