From 8d163d52a3e1e0eacc5c1cdb895e490646e2da85 Mon Sep 17 00:00:00 2001 From: zhl Date: Fri, 14 Apr 2023 16:47:46 +0800 Subject: [PATCH] fix some bug --- src/utils/contract.util.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils/contract.util.ts b/src/utils/contract.util.ts index aa26682..e17ddba 100644 --- a/src/utils/contract.util.ts +++ b/src/utils/contract.util.ts @@ -192,10 +192,10 @@ export function* getPastEventsIter({ yield getPastEvents({ contract, event, fromBlock: from, toBlock: to, options }) from = to.add(ONE) to = to.add(queryRange) - yield new RedisClient().set(redisKey, from + '') + yield new RedisClient().set(redisKey, to + '') } yield getPastEvents({ contract, event, fromBlock: from, toBlock: toBlockBN, options }) - yield new RedisClient().set(redisKey, from + '') + yield new RedisClient().set(redisKey, to + '') } export async function processEvents(web3, iterator, processedEvent) {