Skip to content

Commit

Permalink
fix some bug
Browse files Browse the repository at this point in the history
  • Loading branch information
yoozo committed Feb 12, 2025
1 parent aa851f4 commit 4190451
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
2 changes: 0 additions & 2 deletions packages/node-core/src/indexer/core.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import {ConnectionPoolService} from './connectionPool.service';
import {ConnectionPoolStateManager} from './connectionPoolState.manager';
import {InMemoryCacheService} from './inMemoryCache.service';
import {MonitorService} from './monitor.service';
import {MultiChainRewindService} from './multiChainRewind.service';
import {PoiService, PoiSyncService} from './poi';
import {SandboxService} from './sandbox.service';
import {StoreService} from './store.service';
Expand All @@ -34,7 +33,6 @@ import {storeModelFactory} from './storeModelProvider';
useFactory: storeModelFactory,
inject: [NodeConfig, EventEmitter2, Sequelize],
},
MultiChainRewindService,
AdminListener,
],
controllers: [AdminController],
Expand Down
5 changes: 2 additions & 3 deletions packages/node-core/src/indexer/store.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ export class StoreService {
this.subqueryProject.network.chainId
);

if (this.historical === 'timestamp') {
if (this.config.historical === 'timestamp') {
this._globalDataRepo = GlobalDataFactory(this.sequelize, schema);
}

Expand Down Expand Up @@ -509,8 +509,7 @@ group by

private async initChainRewindTimestamp() {
if (this.historical !== 'timestamp') return;
if (await this.getRewindTimestamp()) return;

if ((await this.getRewindTimestamp()) !== undefined) return;
const rewindTimestampKey = generateRewindTimestampKey(this.subqueryProject.network.chainId);
await this.globalDataRepo.create({key: rewindTimestampKey, value: 0});
}
Expand Down
2 changes: 2 additions & 0 deletions packages/node/src/indexer/fetch.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import {
WorkerBlockDispatcher,
FetchService,
DictionaryService,
MultiChainRewindService,
} from '@subql/node-core';
import { SubstrateDatasource } from '@subql/types';
import { BlockchainService } from '../blockchain.service';
Expand Down Expand Up @@ -67,6 +68,7 @@ import { IIndexerWorker } from './worker/worker';
useClass: ProjectService,
provide: 'IProjectService',
},
MultiChainRewindService,
/* END: Move to node core */
IndexerManager,
{
Expand Down
2 changes: 2 additions & 0 deletions packages/node/src/indexer/worker/worker-fetch.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
WorkerCoreModule,
ProjectService,
DsProcessorService,
MultiChainRewindService,
} from '@subql/node-core';
import { BlockchainService } from '../../blockchain.service';
import { ApiService } from '../api.service';
Expand Down Expand Up @@ -48,6 +49,7 @@ import { WorkerService } from './worker.service';
provide: 'IBlockchainService',
useClass: BlockchainService,
},
MultiChainRewindService,
WorkerService,
],
exports: [],
Expand Down

0 comments on commit 4190451

Please sign in to comment.