Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Cardano.Chain.Delegation.Validation.Scheduling
Contents
Synopsis
- data Environment = Environment {}
- data State = State {}
- data Error
- data ScheduledDelegation = ScheduledDelegation {}
- scheduleCertificate ∷ MonadError Error m ⇒ Environment → State → ACertificate ByteString → m State
Scheduling
data Environment Source #
Constructors
Environment | |
Fields |
Instances
Generic Environment Source # | |
Defined in Cardano.Chain.Delegation.Validation.Scheduling Associated Types type Rep Environment ∷ Type → Type # | |
Show Environment Source # | |
Defined in Cardano.Chain.Delegation.Validation.Scheduling Methods showsPrec ∷ Int → Environment → ShowS # show ∷ Environment → String # showList ∷ [Environment] → ShowS # | |
NFData Environment Source # | |
Defined in Cardano.Chain.Delegation.Validation.Scheduling Methods rnf ∷ Environment → () # | |
Eq Environment Source # | |
type Rep Environment Source # | |
Defined in Cardano.Chain.Delegation.Validation.Scheduling type Rep Environment = D1 ('MetaData "Environment" "Cardano.Chain.Delegation.Validation.Scheduling" "cardano-ledger-byron-1.1.0.0-inplace" 'False) (C1 ('MetaCons "Environment" 'PrefixI 'True) ((S1 ('MetaSel ('Just "protocolMagic") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Annotated ProtocolMagicId ByteString)) :*: S1 ('MetaSel ('Just "allowedDelegators") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Set KeyHash))) :*: (S1 ('MetaSel ('Just "currentEpoch") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 EpochNumber) :*: (S1 ('MetaSel ('Just "currentSlot") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SlotNumber) :*: S1 ('MetaSel ('Just "k") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 BlockCount))))) |
Constructors
State | |
Fields |
Instances
Generic State Source # | |
Show State Source # | |
FromCBOR State Source # | |
ToCBOR State Source # | |
DecCBOR State Source # | |
EncCBOR State Source # | |
NFData State Source # | |
Eq State Source # | |
NoThunks State Source # | |
type Rep State Source # | |
Defined in Cardano.Chain.Delegation.Validation.Scheduling type Rep State = D1 ('MetaData "State" "Cardano.Chain.Delegation.Validation.Scheduling" "cardano-ledger-byron-1.1.0.0-inplace" 'False) (C1 ('MetaCons "State" 'PrefixI 'True) (S1 ('MetaSel ('Just "scheduledDelegations") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Seq ScheduledDelegation)) :*: S1 ('MetaSel ('Just "keyEpochDelegations") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Set (EpochNumber, KeyHash))))) |
Constructors
InvalidCertificate | The delegation certificate has an invalid signature |
MultipleDelegationsForEpoch EpochNumber KeyHash | This delegator has already delegated for the given epoch |
MultipleDelegationsForSlot SlotNumber KeyHash | This delegator has already delgated in this slot |
NonGenesisDelegator KeyHash | This delegator is not one of the allowed genesis keys |
WrongEpoch EpochNumber EpochNumber | This delegation is for a past or for a too future epoch |
data ScheduledDelegation Source #
Constructors
ScheduledDelegation | |
Fields
|
Instances
scheduleCertificate ∷ MonadError Error m ⇒ Environment → State → ACertificate ByteString → m State Source #
Update the delegation State
with a Certificate
if it passes
all the validation rules. This is an implementation of the delegation
scheduling inference rule from the ledger specification.