Add hashrate & difficulty chart resolution scaling

This commit is contained in:
nymkappa
2022-07-06 21:03:55 +02:00
parent 4390d520e7
commit efb5eba092
7 changed files with 58 additions and 22 deletions

View File

@@ -436,7 +436,7 @@ class BlocksRepository {
}
if (blocks[idx].previous_block_hash !== blocks[idx - 1].hash) {
logger.warn(`Chain divergence detected at block ${blocks[idx - 1].height}, re-indexing newer blocks and hashrates`);
logger.warn(`Chain divergence detected at block ${blocks[idx - 1].height}`);
await this.$deleteBlocksFrom(blocks[idx - 1].height);
await BlocksSummariesRepository.$deleteBlocksFrom(blocks[idx - 1].height);
await HashratesRepository.$deleteHashratesFromTimestamp(blocks[idx - 1].timestamp - 604800);