Skip to content

Commit

Permalink
hotfix(idea/indexer): don't sync missed blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
osipov-mit committed Jun 13, 2024
1 parent f571ad5 commit 11c7e62
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion idea/indexer/src/gear/connect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ export async function connectToNode(indexer: GearIndexer, cb: GenesisCb) {

logger.info(`Connected to ${api.runtimeChain} with genesis ${genesis}`);

cb(RMQServiceAction.ADD, genesis);

api.on('disconnected', () => {
logger.warn('Disconnected from the node.');
indexer.stop();
Expand All @@ -42,7 +44,6 @@ export async function connectToNode(indexer: GearIndexer, cb: GenesisCb) {

reconnectionsCounter = 0;
await indexer.run(api);
cb(RMQServiceAction.ADD, genesis);
changeStatus('gear');
}

Expand Down
6 changes: 3 additions & 3 deletions idea/indexer/src/gear/indexer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,9 @@ export class GearIndexer {
this.newBlocks = [];
this.generatorLoop = true;

this.indexNotSyncedBlocks().then(() => {
logger.info('Not synced blocks have been indexed');
});
// this.indexNotSyncedBlocks().then(() => {
// logger.info('Not synced blocks have been indexed');
// });

this.unsub = await this.api.derive.chain.subscribeNewHeads(({ number }) => {
this.newBlocks.push(number.toNumber());
Expand Down

0 comments on commit 11c7e62

Please sign in to comment.