mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-14 12:43:40 +02:00
Merge d6069cb8d6 into merged_master (Bitcoin PR bitcoin/bitcoin#28233)
This commit is contained in:
commit
fea80edd25
1 changed files with 3 additions and 1 deletions
|
|
@ -3164,8 +3164,10 @@ bool Chainstate::FlushStateToDisk(
|
|||
return FatalError(m_chainman.GetNotifications(), state, _("Disk space is too low!"));
|
||||
}
|
||||
// Flush the chainstate (which may refer to block index entries).
|
||||
if (!CoinsTip().Flush())
|
||||
const auto empty_cache{(mode == FlushStateMode::ALWAYS) || fCacheLarge || fCacheCritical || fFlushForPrune};
|
||||
if (empty_cache ? !CoinsTip().Flush() : !CoinsTip().Sync()) {
|
||||
return FatalError(m_chainman.GetNotifications(), state, _("Failed to write to coin database."));
|
||||
}
|
||||
m_last_flush = nNow;
|
||||
full_flush_completed = true;
|
||||
TRACE5(utxocache, flush,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue