File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -1807,6 +1807,7 @@ enum FlushStateMode {
1807
1807
bool static FlushStateToDisk (CValidationState &state, FlushStateMode mode) {
1808
1808
LOCK (cs_main);
1809
1809
static int64_t nLastWrite = 0 ;
1810
+ try {
1810
1811
if ((mode == FLUSH_STATE_ALWAYS) ||
1811
1812
((mode == FLUSH_STATE_PERIODIC || mode == FLUSH_STATE_IF_NEEDED) && pcoinsTip->GetCacheSize () > nCoinCacheSize) ||
1812
1813
(mode == FLUSH_STATE_PERIODIC && GetTimeMicros () > nLastWrite + DATABASE_WRITE_INTERVAL * 1000000 )) {
@@ -1846,6 +1847,9 @@ bool static FlushStateToDisk(CValidationState &state, FlushStateMode mode) {
1846
1847
}
1847
1848
nLastWrite = GetTimeMicros ();
1848
1849
}
1850
+ } catch (const std::runtime_error& e) {
1851
+ return state.Abort (std::string (" System error while flushing: " ) + e.what ());
1852
+ }
1849
1853
return true ;
1850
1854
}
1851
1855
You can’t perform that action at this time.
0 commit comments