mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-25 06:55:32 +01:00
log: print reason for why should_write was triggered in FlushStateToDisk
Co-authored-by: Jon Atack <jon@atack.com>
This commit is contained in:
@@ -2874,6 +2874,9 @@ bool Chainstate::FlushStateToDisk(
|
||||
bool should_write = (mode == FlushStateMode::ALWAYS) || fCacheLarge || fCacheCritical || fPeriodicWrite || fFlushForPrune;
|
||||
// Write blocks, block index and best chain related state to disk.
|
||||
if (should_write) {
|
||||
LogDebug(BCLog::COINDB, "Writing chainstate to disk: flush mode=%s, prune=%d, large=%d, critical=%d, periodic=%d",
|
||||
FlushStateModeNames[size_t(mode)], fFlushForPrune, fCacheLarge, fCacheCritical, fPeriodicWrite);
|
||||
|
||||
// Ensure we can write block index
|
||||
if (!CheckDiskSpace(m_blockman.m_opts.blocks_dir)) {
|
||||
return FatalError(m_chainman.GetNotifications(), state, _("Disk space is too low!"));
|
||||
|
||||
Reference in New Issue
Block a user