Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
-
data
State
=
State
{
- delegationMap :: ! Map
- delegationSlots :: !( Map KeyHash SlotNumber )
- activateDelegation :: State -> ScheduledDelegation -> State
Activation
Maps containing, for each delegator, the active delegation and the slot it became active in.
State | |
|
Instances
Eq State Source # | |
Show State Source # | |
Generic State Source # | |
NFData State Source # | |
|
|
ToCBOR State Source # | |
FromCBOR State Source # | |
NoThunks State Source # | |
type Rep State Source # | |
Defined in Cardano.Chain.Delegation.Validation.Activation
type
Rep
State
=
D1
('
MetaData
"State" "Cardano.Chain.Delegation.Validation.Activation" "cardano-ledger-byron-0.1.0.0-1U5kXR8zMRrE7QjCz70XVD" '
False
) (
C1
('
MetaCons
"State" '
PrefixI
'
True
) (
S1
('
MetaSel
('
Just
"delegationMap") '
NoSourceUnpackedness
'
SourceStrict
'
DecidedStrict
) (
Rec0
Map
)
:*:
S1
('
MetaSel
('
Just
"delegationSlots") '
NoSourceUnpackedness
'
SourceStrict
'
DecidedStrict
) (
Rec0
(
Map
KeyHash
SlotNumber
))))
|
activateDelegation :: State -> ScheduledDelegation -> State Source #
Activate a
ScheduledDelegation
if its activation slot is less than the
previous delegation slot for this delegate, otherwise discard it. This is
an implementation of the delegation activation rule in the ledger
specification.