Merge 27a770b34b into merged_master (Bitcoin PR bitcoin/bitcoin#28280)

This commit is contained in:
ivanlele 2026-03-12 13:14:24 +00:00
commit 06180927d1
No known key found for this signature in database
11 changed files with 542 additions and 131 deletions

View file

@ -3318,7 +3318,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."));
}