Skip to content

Commit

Permalink
fix: round decay to 100 if greater
Browse files Browse the repository at this point in the history
  • Loading branch information
Alok authored and Mikelle committed May 3, 2024
1 parent b4812c1 commit 6c6d31a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions oracle/pkg/updater/updater.go
Original file line number Diff line number Diff line change
Expand Up @@ -545,6 +545,9 @@ func (u *Updater) computeDecayPercentage(startTimestamp, endTimestamp, commitTim
u.logger.Info("decayPercentage", "decayPercentage", decayPercentage)

decayPercentageRound := int64(math.Round(decayPercentage * 100))
if decayPercentageRound > 100 {
decayPercentageRound = 100
}
u.logger.Info("decayPercentageRound", "decayPercentageRound", decayPercentageRound)
return decayPercentageRound
}

0 comments on commit 6c6d31a

Please sign in to comment.