From 0e464385c0f517f32b748875a83bd26618d94aab Mon Sep 17 00:00:00 2001 From: nikugogoi Date: Fri, 4 Nov 2022 10:41:48 +0530 Subject: [PATCH] Remove contracts on reset watcher (#215) --- packages/util/src/indexer.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/util/src/indexer.ts b/packages/util/src/indexer.ts index 83375f31..3fa43d0d 100644 --- a/packages/util/src/indexer.ts +++ b/packages/util/src/indexer.ts @@ -994,6 +994,8 @@ export class Indexer { await this._db.deleteEntitiesByConditions(dbTx, entity, { blockNumber: MoreThan(blockNumber) }); } + await this._db.deleteEntitiesByConditions(dbTx, 'contract', { startingBlock: MoreThan(blockNumber) }); + await this._db.deleteEntitiesByConditions(dbTx, 'block_progress', { blockNumber: MoreThan(blockNumber) }); const syncStatus = await this.getSyncStatus();