From 1d79d8f3c306445d9811a5c461ce823fe03cd1cb Mon Sep 17 00:00:00 2001 From: vrtnd Date: Fri, 13 Sep 2024 17:09:39 +0300 Subject: [PATCH] Reduce solana blocks to query --- src/handlers/runAggregateAllAdapters.ts | 2 +- src/utils/constants.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/handlers/runAggregateAllAdapters.ts b/src/handlers/runAggregateAllAdapters.ts index 97a3a124..9ab3a597 100644 --- a/src/handlers/runAggregateAllAdapters.ts +++ b/src/handlers/runAggregateAllAdapters.ts @@ -4,7 +4,7 @@ import { runAggregateDataAllAdapters } from "../utils/aggregate"; export default wrapScheduledLambda(async (_event) => { const currentDate = new Date(); - const currentTimestamp = convertToUnixTimestamp(currentDate); + const currentTimestamp = convertToUnixTimestamp(currentDate) - 3600; await runAggregateDataAllAdapters(currentTimestamp, true); const currentHour = currentDate.getUTCHours(); if (currentHour === 0) { diff --git a/src/utils/constants.ts b/src/utils/constants.ts index 943c81d1..77721842 100644 --- a/src/utils/constants.ts +++ b/src/utils/constants.ts @@ -23,7 +23,7 @@ export const maxBlocksToQueryByChain = { celo: 1200, klaytn: 6000, sui: 2400, // sui creates a checkpoint about every 3 seconds - solana: 12000, // solana produces slots every 400ms, so 2 hours is 18000 slotsб + solana: 6000, taiko: 100, } as { [chain: string]: number };