bug fix
This commit is contained in:
parent
f092e2e447
commit
b97469fa21
@ -28,7 +28,7 @@ export class BlockSyncSvr {
|
||||
}
|
||||
|
||||
async execute() {
|
||||
try {
|
||||
// try {
|
||||
let currentBlock = await retryEthBlockNumber(this.rpc)
|
||||
let blockStr = await new RedisClient().get(this.redisKey)
|
||||
if (blockStr) {
|
||||
@ -45,9 +45,9 @@ export class BlockSyncSvr {
|
||||
amount: this.batchCount
|
||||
})
|
||||
await this.processBlockDatas(blocks)
|
||||
} catch (err) {
|
||||
console.log(err)
|
||||
}
|
||||
// } catch (err) {
|
||||
// console.log(err)
|
||||
// }
|
||||
}
|
||||
|
||||
async processBlockDatas(iterator: any) {
|
||||
|
@ -41,7 +41,7 @@ export class EventBatchSvr {
|
||||
|
||||
async execute() {
|
||||
|
||||
try {
|
||||
// try {
|
||||
let currentBlock = await retryEthBlockNumber(this.rpc)
|
||||
let toBlock = parseInt(currentBlock.result, 16)
|
||||
let blockStr = await new RedisClient().get(this.redisKey)
|
||||
@ -111,9 +111,10 @@ export class EventBatchSvr {
|
||||
}
|
||||
await new RedisClient().set(this.redisKey, nextBlock + '')
|
||||
|
||||
} catch (err) {
|
||||
console.log(err)
|
||||
}
|
||||
// } catch (err) {
|
||||
// logger.error('sync events error: ', err.message || err)
|
||||
// throw err
|
||||
// }
|
||||
}
|
||||
|
||||
buildRedisKey(cfg: IEventCfg) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user