Skip to content

Commit

Permalink
update progressTxIn log
Browse files Browse the repository at this point in the history
  • Loading branch information
cyber3george committed Feb 27, 2024
1 parent ae72aeb commit 60cabb7
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/service/block/block.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,12 @@ export class BlockService implements OnApplicationBootstrap {
});
if (noProgressCount > 4000) {
const totalInputCount = await this.txInEntityRepository.count({});
const percent = ((noProgressCount / totalInputCount) * 100).toFixed(2);
const needSyncBlock = totalInputCount - noProgressCount;
const percent = (
((totalInputCount - noProgressCount) / totalInputCount) *
100
).toFixed(2);
this.logger.debug(`txIn sync percent: ${percent}%`);
this.logger.debug(`need sync block number: ${needSyncBlock}`);
this.logger.debug(`need sync txIn number: ${noProgressCount}`);
} else {
this.logger.debug(`indexer sync all completed`);
}
Expand Down

0 comments on commit 60cabb7

Please sign in to comment.