We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c8e3978 commit 4a6d1d1Copy full SHA for 4a6d1d1
src/validation.cpp
@@ -2745,8 +2745,10 @@ bool Chainstate::FlushStateToDisk(
2745
return FatalError(m_chainman.GetNotifications(), state, _("Disk space is too low!"));
2746
}
2747
// Flush the chainstate (which may refer to block index entries).
2748
- if (!CoinsTip().Flush())
+ const auto empty_cache{(mode == FlushStateMode::ALWAYS) || fCacheLarge || fCacheCritical || fFlushForPrune};
2749
+ if (empty_cache ? !CoinsTip().Flush() : !CoinsTip().Sync()) {
2750
return FatalError(m_chainman.GetNotifications(), state, _("Failed to write to coin database."));
2751
+ }
2752
m_last_flush = nNow;
2753
full_flush_completed = true;
2754
TRACE5(utxocache, flush,
0 commit comments