mirror of
https://github.com/mempool/mempool.git
synced 2026-08-20 13:28:00 +02:00
Merge branch 'master' into knorrium/calc_precision
This commit is contained in:
commit
2b099e6e2b
1 changed files with 2 additions and 1 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue