Merge pull request #784 from ethereum/JustinDrake-patch-12
Milder ejections
This commit is contained in:
commit
fe3eef2594
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue