fix some bug

This commit is contained in:
zhl 2023-04-14 16:47:46 +08:00
parent 3ddd34282f
commit 8d163d52a3

View File

@ -192,10 +192,10 @@ export function* getPastEventsIter({
yield getPastEvents({ contract, event, fromBlock: from, toBlock: to, options }) yield getPastEvents({ contract, event, fromBlock: from, toBlock: to, options })
from = to.add(ONE) from = to.add(ONE)
to = to.add(queryRange) 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 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) { export async function processEvents(web3, iterator, processedEvent) {