mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-25 12:57:18 +00:00
Clean up ProcessInactivityScores
(#9483)
This commit is contained in:
parent
516401537a
commit
921acc300b
@ -98,12 +98,7 @@ func ProcessInactivityScores(
|
|||||||
if v.IsPrevEpochTargetAttester && !v.IsSlashed {
|
if v.IsPrevEpochTargetAttester && !v.IsSlashed {
|
||||||
// Decrease inactivity score when validator gets target correct.
|
// Decrease inactivity score when validator gets target correct.
|
||||||
if v.InactivityScore > 0 {
|
if v.InactivityScore > 0 {
|
||||||
score := uint64(1)
|
v.InactivityScore -= 1
|
||||||
// Prevents underflow below 0.
|
|
||||||
if score > v.InactivityScore {
|
|
||||||
score = v.InactivityScore
|
|
||||||
}
|
|
||||||
v.InactivityScore -= score
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
v.InactivityScore += bias
|
v.InactivityScore += bias
|
||||||
|
Loading…
Reference in New Issue
Block a user