Set block/:hash/summary expiration to 1 month - Support re-org for block summaries

This commit is contained in:
nymkappa
2022-06-20 16:35:10 +02:00
parent 72a603ac37
commit aa86885e6b
7 changed files with 51 additions and 13 deletions

View File

@@ -29,7 +29,13 @@ class Indexer {
this.indexerRunning = true;
try {
await blocks.$generateBlockDatabase();
const chainValid = await blocks.$generateBlockDatabase();
if (chainValid === false) {
// Chain of block hash was invalid, so we need to reindex. Stop here and continue at the next iteration
this.indexerRunning = false;
return;
}
await this.$resetHashratesIndexingState();
await mining.$generateNetworkHashrateHistory();
await mining.$generatePoolHashrateHistory();