From 5f59aad00d5ae5e719d084972c73ff2a8238fa59 Mon Sep 17 00:00:00 2001 From: Justin Date: Thu, 21 Feb 2019 22:34:11 +0100 Subject: [PATCH] Clarify use of `FAR_FUTURE_EPOCH` as a flag --- specs/core/0_beacon-chain.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/specs/core/0_beacon-chain.md b/specs/core/0_beacon-chain.md index 9463d3b19..51cc9d9f5 100644 --- a/specs/core/0_beacon-chain.md +++ b/specs/core/0_beacon-chain.md @@ -1955,7 +1955,7 @@ def update_validator_registry(state: BeaconState) -> None: # Activate validators within the allowable balance churn balance_churn = 0 for index, validator in enumerate(state.validator_registry): - if validator.activation_epoch > get_delayed_activation_exit_epoch(current_epoch) and state.validator_balances[index] >= MAX_DEPOSIT_AMOUNT: + if validator.activation_epoch == FAR_FUTURE_EPOCH and state.validator_balances[index] >= MAX_DEPOSIT_AMOUNT: # Check the balance churn would be within the allowance balance_churn += get_effective_balance(state, index) if balance_churn > max_balance_churn: @@ -1967,7 +1967,7 @@ def update_validator_registry(state: BeaconState) -> None: # Exit validators within the allowable balance churn balance_churn = 0 for index, validator in enumerate(state.validator_registry): - if validator.exit_epoch > get_delayed_activation_exit_epoch(current_epoch) and validator.initiated_exit: + if validator.activation_epoch == FAR_FUTURE_EPOCH and validator.initiated_exit: # Check the balance churn would be within the allowance balance_churn += get_effective_balance(state, index) if balance_churn > max_balance_churn: @@ -2029,7 +2029,7 @@ def process_exit_queue(state: BeaconState) -> None: def eligible(index): validator = state.validator_registry[index] # Filter out dequeued validators - if validator.withdrawable_epoch < FAR_FUTURE_EPOCH: + if validator.withdrawable_epoch != FAR_FUTURE_EPOCH: return False # Dequeue if the minimum amount of time has passed else: