Skip to content

Commit 0d3f030

Browse files
jayantkJayant Krishnamurthy
andauthored
update staleness check (#319)
Co-authored-by: Jayant Krishnamurthy <jkrishnamurthy@jumptrading.com>
1 parent 16bdc0f commit 0d3f030

File tree

1 file changed

+1
-1
lines changed
  • third_party/pyth/price-service/src

1 file changed

+1
-1
lines changed

third_party/pyth/price-service/src/rest.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ export class RestAPI {
220220
let stalePrices: Record<HexString, number> = {}
221221

222222
for (let priceId of priceIds) {
223-
const latency = currentTime - this.priceFeedVaaInfo.getLatestPriceInfo(priceId)!.priceFeed.publishTime
223+
const latency = currentTime - this.priceFeedVaaInfo.getLatestPriceInfo(priceId)!.attestationTime
224224
if (latency > stalenessThresholdSeconds) {
225225
stalePrices[priceId] = latency
226226
}

0 commit comments

Comments
 (0)