Update 0_beacon-chain.md
This commit is contained in:
parent
e57bfaab7c
commit
2d9724dbfc
|
@ -2148,9 +2148,8 @@ def process_slashings(state: BeaconState) -> None:
|
|||
total_balance = get_total_balance(state, active_validator_indices)
|
||||
|
||||
# Compute `total_penalties`
|
||||
epoch_index = current_epoch % LATEST_SLASHED_EXIT_LENGTH
|
||||
total_at_start = state.latest_slashed_balances[(epoch_index + 1) % LATEST_SLASHED_EXIT_LENGTH]
|
||||
total_at_end = state.latest_slashed_balances[epoch_index]
|
||||
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]
|
||||
total_penalties = total_at_end - total_at_start
|
||||
|
||||
for index, validator in enumerate(state.validator_registry):
|
||||
|
|
Loading…
Reference in New Issue