Merge branch 'master' into nymkappa/use-core-again-because-esplora-is-lol

This commit is contained in:
wiz
2023-03-03 17:39:55 +09:00
committed by GitHub
16 changed files with 79 additions and 63 deletions

View File

@@ -39,6 +39,10 @@ class PoolsParser {
* @param pools
*/
public async migratePoolsJson(): Promise<void> {
// We also need to wipe the backend cache to make sure we don't serve blocks with
// the wrong mining pool (usually happen with unknown blocks)
diskCache.wipeCache();
await this.$insertUnknownPool();
for (const pool of this.miningPools) {
@@ -142,10 +146,6 @@ class PoolsParser {
WHERE pool_id = ?`,
[pool.id]
);
// We also need to wipe the backend cache to make sure we don't serve blocks with
// the wrong mining pool (usually happen with unknown blocks)
diskCache.wipeCache();
}
private async $deleteUnknownBlocks(): Promise<void> {
@@ -156,10 +156,6 @@ class PoolsParser {
WHERE pool_id = ? AND height >= 130635`,
[unknownPool[0].id]
);
// We also need to wipe the backend cache to make sure we don't serve blocks with
// the wrong mining pool (usually happen with unknown blocks)
diskCache.wipeCache();
}
}