From 54c70fad2172a980bebc46f40331e6fda06f323d Mon Sep 17 00:00:00 2001 From: Jayant Krishnamurthy Date: Thu, 29 Sep 2022 13:15:34 -0700 Subject: [PATCH] update staleness check --- third_party/pyth/price-service/src/rest.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/third_party/pyth/price-service/src/rest.ts b/third_party/pyth/price-service/src/rest.ts index b67b220aa6..48b8100a5c 100644 --- a/third_party/pyth/price-service/src/rest.ts +++ b/third_party/pyth/price-service/src/rest.ts @@ -220,7 +220,7 @@ export class RestAPI { let stalePrices: Record = {} 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 }