File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -2831,7 +2831,6 @@ bool Chainstate::FlushStateToDisk(
28312831 try {
28322832 {
28332833 bool fFlushForPrune = false ;
2834- bool fDoFullFlush = false ;
28352834
28362835 CoinsCacheSizeState cache_state = GetCoinsCacheSizeState ();
28372836 LOCK (m_blockman.cs_LastBlockFile );
@@ -2887,10 +2886,10 @@ bool Chainstate::FlushStateToDisk(
28872886 bool fCacheCritical = mode == FlushStateMode::IF_NEEDED && cache_state >= CoinsCacheSizeState::CRITICAL;
28882887 // It's been a while since we wrote the block index and chain state to disk. Do this frequently, so we don't need to redownload or reindex after a crash.
28892888 bool fPeriodicWrite = mode == FlushStateMode::PERIODIC && nNow > m_last_write + DATABASE_WRITE_INTERVAL;
2890- // Combine all conditions that result in a full cache flush .
2891- fDoFullFlush = (mode == FlushStateMode::ALWAYS) || fCacheLarge || fCacheCritical || fPeriodicWrite || fFlushForPrune ;
2889+ // Combine all conditions that result in a write to disk .
2890+ bool should_write = (mode == FlushStateMode::ALWAYS) || fCacheLarge || fCacheCritical || fPeriodicWrite || fFlushForPrune ;
28922891 // Write blocks, block index and best chain related state to disk.
2893- if (fDoFullFlush ) {
2892+ if (should_write ) {
28942893 // Ensure we can write block index
28952894 if (!CheckDiskSpace (m_blockman.m_opts .blocks_dir )) {
28962895 return FatalError (m_chainman.GetNotifications (), state, _ (" Disk space is too low!" ));
You can’t perform that action at this time.
0 commit comments