import { Sequelize } from '@subql/x-sequelize'; import { IProjectUpgradeService } from '../configure'; import { DynamicDsService, IUnfinalizedBlocksService, StoreService, PoiService, ISubqueryProject, Header, MultiChainRewindService } from '../indexer'; import { ForceCleanService } from '../subcommands/forceClean.service'; /** * Reindex the project to ${targetBlockHeight} (continue indexing after this height) * reset project if ${targetBlockHeight} <= startHeight * - storeCache is handled first, flush cached content before the actual rewind starts * - rewind is usually triggered by signal from unfinalizedBlockService, so some state cleanup is required there. FIXME * - dynamicDsService will need to look after, clean all ds that added after the targetHeight * - poi need to cope with rewind as well. FIXME * - in the end, update metadata to targetHeight * @param startHeight * @param targetBlockHeight !IMPORTANT! this height is exclusive in the reindex operation * @param lastProcessedHeight * @param storeService * @param unfinalizedBlockService * @param dynamicDsService * @param sequelize * @param projectUpgradeService * @param multichainRewindService * @param poiService * @param forceCleanService */ export declare function reindex(startHeight: number, targetBlockHeader: Header, lastProcessed: { height: number; timestamp?: number; }, storeService: StoreService, unfinalizedBlockService: IUnfinalizedBlocksService, dynamicDsService: DynamicDsService, sequelize: Sequelize, projectUpgradeService: IProjectUpgradeService, multichainRewindService: MultiChainRewindService, poiService?: PoiService, forceCleanService?: ForceCleanService): Promise;