mirror of
https://github.com/status-im/eth2.0-specs.git
synced 2025-01-27 02:45:28 +00:00
Include recently slashed churn in churn queue
Addresses #527 in combination with #784.
This commit is contained in:
parent
15bf3c4258
commit
e912ed7fca
@ -2102,7 +2102,9 @@ def update_validator_registry(state: BeaconState) -> None:
|
||||
activate_validator(state, index, is_genesis=False)
|
||||
|
||||
# Exit validators within the allowable balance churn
|
||||
balance_churn = 0
|
||||
total_at_start = state.latest_slashed_balances[(current_epoch + 1) % LATEST_SLASHED_EXIT_LENGTH]
|
||||
total_at_end = state.latest_slashed_balances[current_epoch % LATEST_SLASHED_EXIT_LENGTH]
|
||||
balance_churn = total_at_end - total_at_start
|
||||
for index, validator in enumerate(state.validator_registry):
|
||||
if validator.exit_epoch == FAR_FUTURE_EPOCH and validator.initiated_exit:
|
||||
# Check the balance churn would be within the allowance
|
||||
|
Loading…
x
Reference in New Issue
Block a user