mirror of
https://github.com/status-im/eth2.0-specs.git
synced 2025-02-20 06:18:15 +00:00
Apply suggestions from code review
base_reward -> get_base_reward Co-Authored-By: djrtwo <dannyjryan@gmail.com>
This commit is contained in:
parent
b36e70040b
commit
c9e06d31f3
@ -2237,7 +2237,7 @@ def compute_normal_justification_and_finalization_deltas(state: BeaconState) ->
|
|||||||
deltas[1][index] += get_base_reward(state, index)
|
deltas[1][index] += get_base_reward(state, index)
|
||||||
# Proposer bonus
|
# Proposer bonus
|
||||||
proposer_index = get_beacon_proposer_index(state, inclusion_slot(state, index))
|
proposer_index = get_beacon_proposer_index(state, inclusion_slot(state, index))
|
||||||
deltas[0][proposer_index] += base_reward(state, index) // ATTESTATION_INCLUSION_REWARD_QUOTIENT
|
deltas[0][proposer_index] += get_base_reward(state, index) // ATTESTATION_INCLUSION_REWARD_QUOTIENT
|
||||||
return deltas
|
return deltas
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -2261,10 +2261,10 @@ def compute_inactivity_leak_deltas(state: BeaconState) -> Tuple[List[Gwei], List
|
|||||||
else:
|
else:
|
||||||
# If a validator did attest, apply a small penalty for getting attestations included late
|
# If a validator did attest, apply a small penalty for getting attestations included late
|
||||||
deltas[0][index] += (
|
deltas[0][index] += (
|
||||||
base_reward(state, index) * MIN_ATTESTATION_INCLUSION_DELAY //
|
get_base_reward(state, index) * MIN_ATTESTATION_INCLUSION_DELAY //
|
||||||
inclusion_distance(state, index)
|
inclusion_distance(state, index)
|
||||||
)
|
)
|
||||||
deltas[1][index] += base_reward(state, index)
|
deltas[1][index] += get_base_reward(state, index)
|
||||||
if index not in get_attesting_indices(state, boundary_attestations):
|
if index not in get_attesting_indices(state, boundary_attestations):
|
||||||
deltas[1][index] += get_inactivity_penalty(state, index, epochs_since_finality)
|
deltas[1][index] += get_inactivity_penalty(state, index, epochs_since_finality)
|
||||||
if index not in get_attesting_indices(state, matching_head_attestations):
|
if index not in get_attesting_indices(state, matching_head_attestations):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user