From 8bd05987e5ad634ab5f0a588aeb6e63abb9c9642 Mon Sep 17 00:00:00 2001 From: Mononaut Date: Sun, 12 Mar 2023 19:03:19 +0900 Subject: [PATCH] Save cache to disk every 6 blocks --- backend/src/api/blocks.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/api/blocks.ts b/backend/src/api/blocks.ts index ea2985b4f..15c8590e9 100644 --- a/backend/src/api/blocks.ts +++ b/backend/src/api/blocks.ts @@ -641,7 +641,7 @@ class Blocks { if (this.newBlockCallbacks.length) { this.newBlockCallbacks.forEach((cb) => cb(blockExtended, txIds, transactions)); } - if (!memPool.hasPriority()) { + if (!memPool.hasPriority() && (block.height % 6 === 0)) { diskCache.$saveCacheToDisk(); }