Comparing in slot
This commit is contained in:
parent
e0c28a3cd0
commit
6f856ba009
|
@ -1373,7 +1373,7 @@ def slash_validator(state: BeaconState, index: ValidatorIndex) -> None:
|
||||||
Note that this function mutates ``state``.
|
Note that this function mutates ``state``.
|
||||||
"""
|
"""
|
||||||
validator = state.validator_registry[index]
|
validator = state.validator_registry[index]
|
||||||
assert state.slot < validator.withdrawable_epoch # [TO BE REMOVED IN PHASE 2]
|
assert state.slot < get_epoch_start_slot(validator.withdrawable_epoch) # [TO BE REMOVED IN PHASE 2]
|
||||||
exit_validator(state, index)
|
exit_validator(state, index)
|
||||||
state.latest_slashed_balances[get_current_epoch(state) % LATEST_SLASHED_EXIT_LENGTH] += get_effective_balance(state, index)
|
state.latest_slashed_balances[get_current_epoch(state) % LATEST_SLASHED_EXIT_LENGTH] += get_effective_balance(state, index)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue