mirror of
https://github.com/status-im/eth2.0-specs.git
synced 2025-01-13 04:04:19 +00:00
simplify
This commit is contained in:
parent
b361fdb385
commit
4734b22883
@ -1603,12 +1603,11 @@ def get_attestation_deltas(state: BeaconState) -> Tuple[List[Gwei], List[Gwei]]:
|
|||||||
penalties[index] += get_base_reward(state, index)
|
penalties[index] += get_base_reward(state, index)
|
||||||
|
|
||||||
# Proposer and inclusion delay micro-rewards
|
# Proposer and inclusion delay micro-rewards
|
||||||
for index in eligible_validator_indices:
|
for index in get_unslashed_attesting_indices(state, matching_source_attestations):
|
||||||
if index in get_unslashed_attesting_indices(state, matching_source_attestations):
|
earliest_attestation = get_earliest_attestation(state, matching_source_attestations, index)
|
||||||
earliest_attestation = get_earliest_attestation(state, matching_source_attestations, index)
|
rewards[earliest_attestation.proposer_index] += get_base_reward(state, index) // PROPOSER_REWARD_QUOTIENT
|
||||||
rewards[earliest_attestation.proposer_index] += get_base_reward(state, index) // PROPOSER_REWARD_QUOTIENT
|
inclusion_delay = earliest_attestation.inclusion_slot - earliest_attestation.data.slot
|
||||||
inclusion_delay = earliest_attestation.inclusion_slot - earliest_attestation.data.slot
|
rewards[index] += get_base_reward(state, index) * MIN_ATTESTATION_INCLUSION_DELAY // inclusion_delay
|
||||||
rewards[index] += get_base_reward(state, index) * MIN_ATTESTATION_INCLUSION_DELAY // inclusion_delay
|
|
||||||
|
|
||||||
# Inactivity penalty
|
# Inactivity penalty
|
||||||
finality_delay = previous_epoch - state.finalized_epoch
|
finality_delay = previous_epoch - state.finalized_epoch
|
||||||
|
Loading…
x
Reference in New Issue
Block a user