Merge pull request #1800 from mempool/nymkappa/bugfix/missing-cache-version

Re-added missing cache version
This commit is contained in:
wiz 2022-06-04 00:25:38 +09:00 committed by GitHub
commit ab5990a6c7

View File

@ -41,6 +41,7 @@ class DiskCache {
const chunkSize = Math.floor(mempoolArray.length / DiskCache.CHUNK_FILES); const chunkSize = Math.floor(mempoolArray.length / DiskCache.CHUNK_FILES);
await fsPromises.writeFile(DiskCache.FILE_NAME, JSON.stringify({ await fsPromises.writeFile(DiskCache.FILE_NAME, JSON.stringify({
cacheSchemaVersion: this.cacheSchemaVersion,
blocks: blocks.getBlocks(), blocks: blocks.getBlocks(),
mempool: {}, mempool: {},
mempoolArray: mempoolArray.splice(0, chunkSize), mempoolArray: mempoolArray.splice(0, chunkSize),