Merge pull request #784 from ethereum/JustinDrake-patch-12

Milder ejections
This commit is contained in:
Danny Ryan 2019-03-19 12:31:09 -06:00 committed by GitHub
commit fe3eef2594
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -2037,7 +2037,7 @@ def process_ejections(state: BeaconState) -> None:
""" """
for index in get_active_validator_indices(state.validator_registry, get_current_epoch(state)): for index in get_active_validator_indices(state.validator_registry, get_current_epoch(state)):
if state.validator_balances[index] < EJECTION_BALANCE: if state.validator_balances[index] < EJECTION_BALANCE:
exit_validator(state, index) initiate_validator_exit(state, index)
``` ```
#### Validator registry and shuffling seed data #### Validator registry and shuffling seed data

View File

@ -433,7 +433,7 @@ def test_ejection(state):
block.slot += spec.SLOTS_PER_EPOCH block.slot += spec.SLOTS_PER_EPOCH
state_transition(post_state, block) state_transition(post_state, block)
assert post_state.validator_registry[validator_index].exit_epoch < spec.FAR_FUTURE_EPOCH assert post_state.validator_registry[validator_index].initiated_exit == True
return pre_state, [block], post_state return pre_state, [block], post_state