Skip to content

Commit

Permalink
Update 0_beacon-chain.md
Browse files Browse the repository at this point in the history
  • Loading branch information
JustinDrake committed Apr 6, 2019
1 parent 00872e0 commit 47464f2
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions specs/core/0_beacon-chain.md
Original file line number Diff line number Diff line change
Expand Up @@ -1371,7 +1371,11 @@ def activate_validator(state: BeaconState, index: ValidatorIndex, is_genesis: bo
"""
validator = state.validator_registry[index]

validator.activation_epoch = GENESIS_EPOCH if is_genesis else get_delayed_activation_exit_epoch(get_current_epoch(state))
if is_genesis:
validator.activation_eligibility_epoch = GENESIS_EPOCH
validator.activation_epoch = GENESIS_EPOCH
else:
validator.activation_epoch = get_delayed_activation_exit_epoch(get_current_epoch(state))
```

#### `initiate_validator_exit`
Expand Down Expand Up @@ -2027,9 +2031,8 @@ Run the following function:
def update_registry(state: BeaconState) -> None:
activation_queue = sorted([
validator for validator in state.validator_registry if
validator.activation_epoch == FAR_FUTURE_EPOCH and
validator.activation_eligibility_epoch != FAR_FUTURE_EPOCH and
validator.activation_eligibility_epoch > state.finalized_epoch
validator.activation_epoch >= get_delayed_activation_exit_epoch(state.finalized_epoch)
], key=lambda index: state.validator_registry[index].activation_eligibility_epoch)

for index in activation_queue[:MAX_ACTIVATIONS_PER_FINALIZED_EPOCH]:
Expand Down

0 comments on commit 47464f2

Please sign in to comment.