Changeset View
Changeset View
Standalone View
Standalone View
src/init.cpp
Show First 20 Lines • Show All 2,557 Lines • ▼ Show 20 Lines | while (!fLoaded && !ShutdownRequested()) { | ||||
bool failed_verification = false; | bool failed_verification = false; | ||||
const int64_t load_block_index_start_time = GetTimeMillis(); | const int64_t load_block_index_start_time = GetTimeMillis(); | ||||
try { | try { | ||||
LOCK(cs_main); | LOCK(cs_main); | ||||
chainman.InitializeChainstate(); | chainman.InitializeChainstate(); | ||||
chainman.m_total_coinstip_cache = nCoinCacheUsage; | chainman.m_total_coinstip_cache = nCoinCacheUsage; | ||||
chainman.m_total_coinsdb_cache = nCoinDBCache; | chainman.m_total_coinsdb_cache = nCoinDBCache; | ||||
UnloadBlockIndex(); | UnloadBlockIndex(node.mempool); | ||||
// new CBlockTreeDB tries to delete the existing file, which | // new CBlockTreeDB tries to delete the existing file, which | ||||
// fails if it's still open from the previous loop. Close it | // fails if it's still open from the previous loop. Close it | ||||
// first: | // first: | ||||
pblocktree.reset(); | pblocktree.reset(); | ||||
pblocktree.reset( | pblocktree.reset( | ||||
new CBlockTreeDB(nBlockTreeDBCache, false, fReset)); | new CBlockTreeDB(nBlockTreeDBCache, false, fReset)); | ||||
▲ Show 20 Lines • Show All 454 Lines • Show Last 20 Lines |