Apply suggestions from code review
Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com>
This commit is contained in:
parent
09cefa03f3
commit
6371707779
|
@ -371,7 +371,7 @@ def get_flag_index_deltas(state: BeaconState, flag_index: int) -> Tuple[Sequence
|
||||||
if not is_in_inactivity_leak(state):
|
if not is_in_inactivity_leak(state):
|
||||||
reward_numerator = base_reward * weight * unslashed_participating_increments
|
reward_numerator = base_reward * weight * unslashed_participating_increments
|
||||||
rewards[index] += Gwei(reward_numerator // (active_increments * WEIGHT_DENOMINATOR))
|
rewards[index] += Gwei(reward_numerator // (active_increments * WEIGHT_DENOMINATOR))
|
||||||
elif not flag_index == TIMELY_HEAD_FLAG_INDEX:
|
elif flag_index != TIMELY_HEAD_FLAG_INDEX:
|
||||||
penalties[index] += Gwei(base_reward * weight // WEIGHT_DENOMINATOR)
|
penalties[index] += Gwei(base_reward * weight // WEIGHT_DENOMINATOR)
|
||||||
return rewards, penalties
|
return rewards, penalties
|
||||||
```
|
```
|
||||||
|
|
Loading…
Reference in New Issue