Skip to content

Commit

Permalink
comment
Browse files Browse the repository at this point in the history
  • Loading branch information
RogerKSI committed Jan 13, 2025
1 parent 3709c00 commit f759334
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions x/feeds/keeper/keeper_price.go
Original file line number Diff line number Diff line change
Expand Up @@ -290,15 +290,19 @@ func CheckMissReport(
deadlineTime := lastUpdateTimestamp + gracePeriod
deadlineBlock := lastUpdateBlock + gracePeriod/types.ExpectedBlockTime

// Extend deadline if the validator just became active.
if valInfo.Status.Since.Unix()+gracePeriod > deadlineTime {
deadlineTime = valInfo.Status.Since.Unix() + gracePeriod
}

// Extend deadline if the validator has a valid price within the feed interval.
if valPrice.SignalPriceStatus != types.SIGNAL_PRICE_STATUS_UNSPECIFIED {
// Extend deadline time based on the price timestamp.
if valPrice.Timestamp+feed.Interval > deadlineTime {
deadlineTime = valPrice.Timestamp + feed.Interval
}

// Extend deadline block based on the price block height.
if valPrice.BlockHeight+feed.Interval/types.ExpectedBlockTime > deadlineBlock {
deadlineBlock = valPrice.BlockHeight + feed.Interval/types.ExpectedBlockTime
}
Expand Down

0 comments on commit f759334

Please sign in to comment.