Save new disk cache after ignoring blocks

This commit is contained in:
softsimon 2023-05-25 19:19:14 +04:00
parent aeb896e200
commit 038f9659bb
No known key found for this signature in database
GPG Key ID: 488D7DCFB5A430D7

View File

@ -222,6 +222,9 @@ class DiskCache {
if (!this.ignoreBlocksCache) {
blocks.setBlocks(data.blocks);
blocks.setBlockSummaries(data.blockSummaries || []);
} else {
logger.info('Re-saving cache with empty recent blocks data');
await this.$saveCacheToDisk(true);
}
} catch (e) {
logger.warn('Failed to parse mempoool and blocks cache. Skipping. Reason: ' + (e instanceof Error ? e.message : e));