Skip to content

Commit

Permalink
fix: bring back historical blocklist
Browse files Browse the repository at this point in the history
  • Loading branch information
doomsower committed Jul 22, 2024
1 parent 5534e7e commit 13aabb6
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/services/RedstoneServiceV3.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ export type RedstonePriceFeed = Extract<
{ type: PriceFeedType.REDSTONE_ORACLE }
>;

const CACHE_BLOCKLIST = new Set<string>([
// "rsETH_FUNDAMENTAL",
// "weETH_FUNDAMENTAL",
// "ezETH_FUNDAMENTAL",
const HISTORICAL_BLOCKLIST = new Set<string>([
"rsETH_FUNDAMENTAL",
"weETH_FUNDAMENTAL",
"ezETH_FUNDAMENTAL",
]);

@DI.Injectable(DI.Redstone)
Expand Down Expand Up @@ -241,8 +241,7 @@ export class RedstoneServiceV3 {
logContext: Record<string, any> = {},
): Promise<PriceOnDemandExtras> {
const logger = this.logger.child(logContext);
const cacheAllowed =
this.config.optimistic && !CACHE_BLOCKLIST.has(dataFeedId);
const cacheAllowed = this.config.optimistic;
const key = redstoneCacheKey(
token,
reserve,
Expand All @@ -261,7 +260,7 @@ export class RedstoneServiceV3 {
dataServiceId,
dataPackagesIds: [dataFeedId],
uniqueSignersCount,
historicalTimestamp: CACHE_BLOCKLIST.has(dataFeedId)
historicalTimestamp: HISTORICAL_BLOCKLIST.has(dataFeedId)
? undefined
: this.#optimisticTimestamp,
}).prepareRedstonePayload(true);
Expand Down

0 comments on commit 13aabb6

Please sign in to comment.