Changeset View
Changeset View
Standalone View
Standalone View
src/validation.cpp
Show First 20 Lines • Show All 4,845 Lines • ▼ Show 20 Lines | static bool LoadBlockIndexDB(ChainstateManager &chainman, | ||||
// Check whether we need to continue reindexing | // Check whether we need to continue reindexing | ||||
if (pblocktree->IsReindexing()) { | if (pblocktree->IsReindexing()) { | ||||
fReindex = true; | fReindex = true; | ||||
} | } | ||||
return true; | return true; | ||||
} | } | ||||
void CChainState::LoadMempool(const Config &config, const ArgsManager &args) { | |||||
if (args.GetArg("-persistmempool", DEFAULT_PERSIST_MEMPOOL)) { | |||||
::LoadMempool(config, m_mempool); | |||||
} | |||||
m_mempool.SetIsLoaded(!ShutdownRequested()); | |||||
} | |||||
bool CChainState::LoadChainTip(const CChainParams &chainparams) { | bool CChainState::LoadChainTip(const CChainParams &chainparams) { | ||||
AssertLockHeld(cs_main); | AssertLockHeld(cs_main); | ||||
const CCoinsViewCache &coins_cache = CoinsTip(); | const CCoinsViewCache &coins_cache = CoinsTip(); | ||||
// Never called when the coins view is empty | // Never called when the coins view is empty | ||||
assert(!coins_cache.GetBestBlock().IsNull()); | assert(!coins_cache.GetBestBlock().IsNull()); | ||||
const CBlockIndex *tip = m_chain.Tip(); | const CBlockIndex *tip = m_chain.Tip(); | ||||
if (tip && tip->GetBlockHash() == coins_cache.GetBestBlock()) { | if (tip && tip->GetBlockHash() == coins_cache.GetBestBlock()) { | ||||
▲ Show 20 Lines • Show All 1,301 Lines • Show Last 20 Lines |