When we re-index blocks due to mining pools change, wipe the nodejs backend cache

This commit is contained in:
nymkappa
2023-02-26 11:30:12 +09:00
parent b6c7c02a2d
commit 32733a3023
2 changed files with 10 additions and 0 deletions

View File

@@ -62,6 +62,7 @@ class DiskCache {
}
wipeCache() {
logger.notice(`Wipping nodejs backend cache/cache*.json files`);
fs.unlinkSync(DiskCache.FILE_NAME);
for (let i = 1; i < DiskCache.CHUNK_FILES; i++) {
fs.unlinkSync(DiskCache.FILE_NAMES.replace('{number}', i.toString()));