Save cache to disk every 6 blocks

This commit is contained in:
Mononaut 2023-03-12 19:03:19 +09:00
parent 7e676dbaf0
commit 8bd05987e5
No known key found for this signature in database
GPG Key ID: A3F058E41374C04E

View File

@ -641,7 +641,7 @@ class Blocks {
if (this.newBlockCallbacks.length) { if (this.newBlockCallbacks.length) {
this.newBlockCallbacks.forEach((cb) => cb(blockExtended, txIds, transactions)); this.newBlockCallbacks.forEach((cb) => cb(blockExtended, txIds, transactions));
} }
if (!memPool.hasPriority()) { if (!memPool.hasPriority() && (block.height % 6 === 0)) {
diskCache.$saveCacheToDisk(); diskCache.$saveCacheToDisk();
} }