Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
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 #
Instances
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.0.2.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))))) |
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 #
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.