Moved comment and changed conditional
This commit is contained in:
parent
3f4be7abb7
commit
a5b1f2cc0a
|
@ -1324,12 +1324,12 @@ def initiate_validator_exit(state: BeaconState, index: int) -> None:
|
|||
def exit_validator(state: BeaconState, index: int) -> None:
|
||||
validator = state.validator_registry[index]
|
||||
|
||||
if validator.exit_slot < state.slot + ENTRY_EXIT_DELAY:
|
||||
# The following updates only occur if not previous exited
|
||||
if validator.exit_slot <= state.slot + ENTRY_EXIT_DELAY:
|
||||
return
|
||||
|
||||
validator.exit_slot = state.slot + ENTRY_EXIT_DELAY
|
||||
|
||||
# The following updates only occur if not previous exited
|
||||
state.validator_registry_exit_count += 1
|
||||
validator.exit_count = state.validator_registry_exit_count
|
||||
state.validator_registry_delta_chain_tip = hash_tree_root(
|
||||
|
|
Loading…
Reference in New Issue