mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-22 11:32:09 +00:00
Move finality delay calculation (#8757)
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
This commit is contained in:
parent
efbefaeb7c
commit
3e686a71e3
@ -134,8 +134,6 @@ func attestationDelta(pBal *Balance, v *Validator, prevEpoch, finalizedEpoch typ
|
||||
}
|
||||
|
||||
// Process finality delay penalty
|
||||
finalityDelay := helpers.FinalityDelay(prevEpoch, finalizedEpoch)
|
||||
|
||||
if helpers.IsInInactivityLeak(prevEpoch, finalizedEpoch) {
|
||||
// If validator is performing optimally, this cancels all rewards for a neutral balance.
|
||||
proposerReward := br / params.BeaconConfig().ProposerRewardQuotient
|
||||
@ -144,6 +142,7 @@ func attestationDelta(pBal *Balance, v *Validator, prevEpoch, finalizedEpoch typ
|
||||
// Equivalent to the following condition from the spec:
|
||||
// `index not in get_unslashed_attesting_indices(state, matching_target_attestations)`
|
||||
if !v.IsPrevEpochTargetAttester || v.IsSlashed {
|
||||
finalityDelay := helpers.FinalityDelay(prevEpoch, finalizedEpoch)
|
||||
p += vb * uint64(finalityDelay) / params.BeaconConfig().InactivityPenaltyQuotient
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user