diff --git a/src/modules/crawler/crawler.evmbridge.ts b/src/modules/crawler/crawler.evmbridge.ts index 8c27888..2e5e45e 100644 --- a/src/modules/crawler/crawler.evmbridge.ts +++ b/src/modules/crawler/crawler.evmbridge.ts @@ -70,6 +70,7 @@ export class BlockchainEVMCrawler { const isExist = await queryRunner.manager.findOneBy(EventLog, { txHashLock: event.transactionHash }); if (isExist) { this.logger.warn('Duplicated event', event.transactionHash); + return; } const blockTimeOfBlockNumber = await this.ethBridgeContract.getBlockTimeByBlockNumber(event.blockNumber); const eventUnlock = { diff --git a/src/modules/crawler/crawler.minabridge.ts b/src/modules/crawler/crawler.minabridge.ts index ccf8eee..bb2619f 100644 --- a/src/modules/crawler/crawler.minabridge.ts +++ b/src/modules/crawler/crawler.minabridge.ts @@ -102,6 +102,7 @@ export class SCBridgeMinaCrawler { const isExist = await queryRunner.manager.findOneBy(EventLog, { txHashLock }); if (isExist) { this.logger.warn('Duplicated event', txHashLock); + return; } const eventUnlock = { senderAddress: JSON.parse(JSON.stringify(event.event.data.locker)),