mirror of
https://github.com/status-im/eth2.0-specs.git
synced 2025-01-24 01:20:56 +00:00
remove timely_head penalty
This commit is contained in:
parent
a6b8574962
commit
a9cc036184
@ -372,7 +372,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))
|
||||||
else:
|
elif not 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
|
||||||
```
|
```
|
||||||
|
@ -147,7 +147,9 @@ def run_attestation_component_deltas(spec, state, component_delta_fn, matching_a
|
|||||||
assert penalties[index] == 0
|
assert penalties[index] == 0
|
||||||
else:
|
else:
|
||||||
assert rewards[index] == 0
|
assert rewards[index] == 0
|
||||||
if enough_for_reward:
|
if is_post_altair(spec) and 'head' in deltas_name:
|
||||||
|
assert penalties[index] == 0
|
||||||
|
elif enough_for_reward:
|
||||||
assert penalties[index] > 0
|
assert penalties[index] > 0
|
||||||
else:
|
else:
|
||||||
assert penalties[index] == 0
|
assert penalties[index] == 0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user