Changeset View
Changeset View
Standalone View
Standalone View
src/node/chainstate.cpp
Show All 23 Lines | auto is_coinsview_empty = | ||||
chainstate->CoinsTip().GetBestBlock().IsNull(); | chainstate->CoinsTip().GetBestBlock().IsNull(); | ||||
}; | }; | ||||
LOCK(cs_main); | LOCK(cs_main); | ||||
chainman.InitializeChainstate(mempool); | chainman.InitializeChainstate(mempool); | ||||
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(mempool, chainman); | |||||
auto &pblocktree{chainman.m_blockman.m_block_tree_db}; | auto &pblocktree{chainman.m_blockman.m_block_tree_db}; | ||||
// 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 first: | // fails if it's still open from the previous loop. Close it first: | ||||
pblocktree.reset(); | pblocktree.reset(); | ||||
pblocktree.reset( | pblocktree.reset( | ||||
new CBlockTreeDB(nBlockTreeDBCache, block_tree_db_in_memory, fReset)); | new CBlockTreeDB(nBlockTreeDBCache, block_tree_db_in_memory, fReset)); | ||||
if (fReset) { | if (fReset) { | ||||
▲ Show 20 Lines • Show All 126 Lines • Show Last 20 Lines |