diff --git a/specs/core/0_beacon-chain.md b/specs/core/0_beacon-chain.md index 0f020be53..11f5007ee 100644 --- a/specs/core/0_beacon-chain.md +++ b/specs/core/0_beacon-chain.md @@ -2030,12 +2030,10 @@ def process_penalties_and_exits(state: BeaconState) -> None: eligible_indices = filter(eligible, all_indices) # Sort in order of exit epoch, and validators that exit within the same epoch exit in order of validator index sorted_indices = sorted(eligible_indices, key=lambda index: state.validator_registry[index].exit_epoch) - withdrawn_so_far = 0 - for index in sorted_indices: - prepare_validator_for_withdrawal(state, index) - withdrawn_so_far += 1 + for withdrawn_so_far, index in enumerate(sorted_indices): if withdrawn_so_far >= MAX_WITHDRAWALS_PER_EPOCH: break + prepare_validator_for_withdrawal(state, index) ``` #### Final updates