update staleness check (#319)
Co-authored-by: Jayant Krishnamurthy <jkrishnamurthy@jumptrading.com>
This commit is contained in:
parent
16bdc0f4c3
commit
0d3f030ad2
|
@ -220,7 +220,7 @@ export class RestAPI {
|
||||||
let stalePrices: Record<HexString, number> = {}
|
let stalePrices: Record<HexString, number> = {}
|
||||||
|
|
||||||
for (let priceId of priceIds) {
|
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) {
|
if (latency > stalenessThresholdSeconds) {
|
||||||
stalePrices[priceId] = latency
|
stalePrices[priceId] = latency
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue