Moved comment and changed conditional

This commit is contained in:
vbuterin 2019-01-03 19:44:39 -06:00 committed by GitHub
parent 3f4be7abb7
commit a5b1f2cc0a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -1324,12 +1324,12 @@ def initiate_validator_exit(state: BeaconState, index: int) -> None:
def exit_validator(state: BeaconState, index: int) -> None: def exit_validator(state: BeaconState, index: int) -> None:
validator = state.validator_registry[index] 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 return
validator.exit_slot = state.slot + ENTRY_EXIT_DELAY validator.exit_slot = state.slot + ENTRY_EXIT_DELAY
# The following updates only occur if not previous exited
state.validator_registry_exit_count += 1 state.validator_registry_exit_count += 1
validator.exit_count = state.validator_registry_exit_count validator.exit_count = state.validator_registry_exit_count
state.validator_registry_delta_chain_tip = hash_tree_root( state.validator_registry_delta_chain_tip = hash_tree_root(