查询事件时,每次只查一个topic, 修正redeem事件名的错误

This commit is contained in:
CounterFire2023 2024-01-15 15:44:29 +08:00
parent 4ce4eac368
commit 1bcdd0879c
3 changed files with 3 additions and 3 deletions

View File

@ -42,7 +42,7 @@
{
"chain": 421614,
"address": "0xd46fA2E72BA0F54092D0eF6a6e0D1d5660259C7a",
"event": "Staked",
"event": "Redeem",
"abi": "NFT_Redeem",
"fromBlock": 3549891,
"eventProcesser": "NftStake"

View File

@ -62,7 +62,7 @@ export class EventBatchSvr {
params.push(_param)
} else {
let _param = uninParams[uninParams.length - 1]
if (!_param || topicsSet.size > MAX_TOPICS) {
if (!_param || topicsSet.size > 1) {
_param = this.buildQueryParams(cfg, toBlock)
uninParams.push(_param)
topicsSet = new Set()

View File

@ -4,7 +4,7 @@ import logger from "logger/logger";
import { RedisClient } from "redis/RedisClient";
import { utf8ToHex } from "./string.util";
const MAX_BATCH_AMOUNT = 500
const MAX_BATCH_AMOUNT = +process.env.MAX_BLOCK_BATCH_AMOUNT
const REQUEST_INTERVAL = 0.5 * 1000
export async function divQueryPassBlocks({chainId, rpc, fromBlock, amount}