Merge branch 'master' into knorrium/calc_precision

This commit is contained in:
Felipe Knorr Kuhn 2026-02-15 09:23:50 -08:00 committed by GitHub
commit 2b099e6e2b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -218,7 +218,7 @@ class Mining {
const now = new Date();
// Run only if:
// * this.lastWeeklyHashrateIndexingDate is set to null (node backend restart, reorg)
// * this.lastWeeklyHashrateIndexingDate is set to null (node backend restart, reorg, or re-indexing was requested after mining pools update)
// * we started a new week (around Monday midnight)
const runIndexing = this.lastWeeklyHashrateIndexingDate === null ||
now.getUTCDay() === 1 && this.lastWeeklyHashrateIndexingDate !== now.getUTCDate();
@ -334,6 +334,7 @@ class Mining {
logger.notice(`hashrates will now be re-indexed`);
await database.query(`TRUNCATE hashrates`);
this.lastHashrateIndexingDate = 0;
this.lastWeeklyHashrateIndexingDate = null;
this.reindexHashrateRequested = false;
}