Changeset View
Changeset View
Standalone View
Standalone View
src/validation.cpp
Show First 20 Lines • Show All 56 Lines • ▼ Show 20 Lines | |||||
#include <optional> | #include <optional> | ||||
#include <string> | #include <string> | ||||
#include <thread> | #include <thread> | ||||
#define MICRO 0.000001 | #define MICRO 0.000001 | ||||
#define MILLI 0.001 | #define MILLI 0.001 | ||||
/** Time to wait (in seconds) between writing blocks/block index to disk. */ | |||||
static const unsigned int DATABASE_WRITE_INTERVAL = 60 * 60; | |||||
/** Time to wait (in seconds) between flushing chainstate to disk. */ | |||||
static const unsigned int DATABASE_FLUSH_INTERVAL = 24 * 60 * 60; | |||||
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 5,966 Lines • Show Last 20 Lines |