aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Toth <andrewstoth@gmail.com>2024-07-17 23:20:32 -0400
committerAndrew Toth <andrewstoth@gmail.com>2024-08-05 22:34:35 -0400
commit589db872e116779ab9cae693171ac8a8c02d9923 (patch)
tree0c790aeabf1213c14f6fa72179ff090faeb26718
parent0e8918755f725b6269ed2be5a0b46f1611233515 (diff)
validation: don't erase coins cache on prune flushes
-rw-r--r--src/validation.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/validation.cpp b/src/validation.cpp
index d6b3924cda..9ee44bc675 100644
--- a/src/validation.cpp
+++ b/src/validation.cpp
@@ -2902,7 +2902,7 @@ bool Chainstate::FlushStateToDisk(
return FatalError(m_chainman.GetNotifications(), state, _("Disk space is too low!"));
}
// Flush the chainstate (which may refer to block index entries).
- const auto empty_cache{(mode == FlushStateMode::ALWAYS) || fCacheLarge || fCacheCritical || fFlushForPrune};
+ const auto empty_cache{(mode == FlushStateMode::ALWAYS) || fCacheLarge || fCacheCritical};
if (empty_cache ? !CoinsTip().Flush() : !CoinsTip().Sync()) {
return FatalError(m_chainman.GetNotifications(), state, _("Failed to write to coin database."));
}