Changeset View
Changeset View
Standalone View
Standalone View
src/validation.cpp
Show First 20 Lines • Show All 2,171 Lines • ▼ Show 20 Lines | try { | ||||
} | } | ||||
if (fDoFullFlush || | if (fDoFullFlush || | ||||
((mode == FlushStateMode::ALWAYS || | ((mode == FlushStateMode::ALWAYS || | ||||
mode == FlushStateMode::PERIODIC) && | mode == FlushStateMode::PERIODIC) && | ||||
nNow > | nNow > | ||||
nLastSetChain + (int64_t)DATABASE_WRITE_INTERVAL * 1000000)) { | nLastSetChain + (int64_t)DATABASE_WRITE_INTERVAL * 1000000)) { | ||||
// Update best block in wallet (so we can detect restored wallets). | // Update best block in wallet (so we can detect restored wallets). | ||||
GetMainSignals().SetBestChain(chainActive.GetLocator()); | GetMainSignals().ChainStateFlushed(chainActive.GetLocator()); | ||||
nLastSetChain = nNow; | nLastSetChain = nNow; | ||||
} | } | ||||
} catch (const std::runtime_error &e) { | } catch (const std::runtime_error &e) { | ||||
return AbortNode(state, std::string("System error while flushing: ") + | return AbortNode(state, std::string("System error while flushing: ") + | ||||
e.what()); | e.what()); | ||||
} | } | ||||
return true; | return true; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 3,546 Lines • Show Last 20 Lines |