update staleness check (#319)

Co-authored-by: Jayant Krishnamurthy <jkrishnamurthy@jumptrading.com>
This commit is contained in:
Jayant Krishnamurthy 2022-09-29 13:36:39 -07:00 committed by GitHub
parent 16bdc0f4c3
commit 0d3f030ad2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -220,7 +220,7 @@ export class RestAPI {
let stalePrices: Record<HexString, number> = {}
for (let priceId of priceIds) {
const latency = currentTime - this.priceFeedVaaInfo.getLatestPriceInfo(priceId)!.priceFeed.publishTime
const latency = currentTime - this.priceFeedVaaInfo.getLatestPriceInfo(priceId)!.attestationTime
if (latency > stalenessThresholdSeconds) {
stalePrices[priceId] = latency
}