From 18e430393e011cfe2d9a0a133c7ce145706e76fb Mon Sep 17 00:00:00 2001 From: vbuterin Date: Wed, 30 Jan 2019 15:03:42 +0000 Subject: [PATCH] Update specs/core/0_beacon-chain.md Co-Authored-By: JustinDrake --- specs/core/0_beacon-chain.md | 1 + 1 file changed, 1 insertion(+) diff --git a/specs/core/0_beacon-chain.md b/specs/core/0_beacon-chain.md index 49868123a..8d4359733 100644 --- a/specs/core/0_beacon-chain.md +++ b/specs/core/0_beacon-chain.md @@ -1960,6 +1960,7 @@ def process_penalties_and_exits(state: BeaconState) -> None: all_indices = list(range(len(state.validator_registry))) 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: