diff --git a/packages/node-core/src/meta/health.service.ts b/packages/node-core/src/meta/health.service.ts index 4df05a816d..8678242984 100644 --- a/packages/node-core/src/meta/health.service.ts +++ b/packages/node-core/src/meta/health.service.ts @@ -60,7 +60,14 @@ export class HealthService { getHealth(): void { if (this.recordBlockTimestamp && Date.now() - this.recordBlockTimestamp > this.blockTime * 10) { - throw new Error('Endpoint is not healthy'); + //check if current processing height reached target height + if ( + this.recordBlockHeight && + this.currentProcessingHeight && + this.recordBlockHeight > this.currentProcessingHeight + ) { + throw new Error('Endpoint is not healthy'); + } } if (this.currentProcessingTimestamp && Date.now() - this.currentProcessingTimestamp > this.healthTimeout) { throw new Error('Indexer is not healthy');