From 47464f28dc014ea2bb2a20121a1353fc80180174 Mon Sep 17 00:00:00 2001 From: Justin Date: Sun, 7 Apr 2019 08:45:43 +1000 Subject: [PATCH] Update 0_beacon-chain.md --- specs/core/0_beacon-chain.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/specs/core/0_beacon-chain.md b/specs/core/0_beacon-chain.md index 079971fc8..8a7b24cec 100644 --- a/specs/core/0_beacon-chain.md +++ b/specs/core/0_beacon-chain.md @@ -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` @@ -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]: