This commit is contained in:
Justin 2019-01-02 13:51:57 +00:00 committed by GitHub
parent 696bf23b5e
commit 93b18d5160
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -1731,7 +1731,7 @@ def process_penalties_and_exits(state: BeaconState) -> None:
total_at_start = state.latest_penalized_exit_balances[(e + 1) % LATEST_PENALIZED_EXIT_LENGTH] total_at_start = state.latest_penalized_exit_balances[(e + 1) % LATEST_PENALIZED_EXIT_LENGTH]
total_at_end = state.latest_penalized_exit_balances[e] total_at_end = state.latest_penalized_exit_balances[e]
total_penalties = total_at_end - total_at_start total_penalties = total_at_end - total_at_start
penalty = get_effective_balance(state, i) * min(total_penalties * 3, total_balance) // total_balance penalty = get_effective_balance(state, index) * min(total_penalties * 3, total_balance) // total_balance
state.validator_balances[index] -= penalty state.validator_balances[index] -= penalty
def eligible(index): def eligible(index):