Changeset View
Changeset View
Standalone View
Standalone View
src/validation.cpp
Show First 20 Lines • Show All 59 Lines • ▼ Show 20 Lines | |||||
#define MICRO 0.000001 | #define MICRO 0.000001 | ||||
#define MILLI 0.001 | #define MILLI 0.001 | ||||
/** Time to wait between writing blocks/block index to disk. */ | /** Time to wait between writing blocks/block index to disk. */ | ||||
static constexpr std::chrono::hours DATABASE_WRITE_INTERVAL{1}; | static constexpr std::chrono::hours DATABASE_WRITE_INTERVAL{1}; | ||||
/** Time to wait between flushing chainstate to disk. */ | /** Time to wait between flushing chainstate to disk. */ | ||||
static constexpr std::chrono::hours DATABASE_FLUSH_INTERVAL{24}; | static constexpr std::chrono::hours DATABASE_FLUSH_INTERVAL{24}; | ||||
const std::vector<std::string> CHECKLEVEL_DOC{ | |||||
"level 0 reads the blocks from disk", | |||||
"level 1 verifies block validity", | |||||
"level 2 verifies undo data", | |||||
"level 3 checks disconnection of tip blocks", | |||||
"level 4 tries to reconnect the blocks", | |||||
"each level includes the checks of the previous levels", | |||||
}; | |||||
ChainstateManager g_chainman; | ChainstateManager g_chainman; | ||||
CChainState &ChainstateActive() { | CChainState &ChainstateActive() { | ||||
LOCK(::cs_main); | LOCK(::cs_main); | ||||
assert(g_chainman.m_active_chainstate); | assert(g_chainman.m_active_chainstate); | ||||
return *g_chainman.m_active_chainstate; | return *g_chainman.m_active_chainstate; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 6,054 Lines • Show Last 20 Lines |