Only save cache on new block when in sync.

This commit is contained in:
softsimon committed 2021-01-22 23:20:39 +07:00
1 parent d3a6dc8856
commit ccec935193
1 file changed
+3 -1
+3 -1
View File
@@ -116,7 +116,9 @@ class Blocks {
if (this.newBlockCallbacks.length) {
this.newBlockCallbacks.forEach((cb) => cb(blockExtended, txIds, transactions));
}
diskCache.$saveCacheToDisk();
if (memPool.isInSync()) {
diskCache.$saveCacheToDisk();
}
}
}