mirror of
https://github.com/mempool/mempool.git
synced 2025-01-17 18:52:34 +01:00
Only save cache on new block when in sync.
This commit is contained in:
parent
494119d119
commit
e82c89a985
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user