Changeset View
Changeset View
Standalone View
Standalone View
src/validation.cpp
Show First 20 Lines • Show All 2,861 Lines • ▼ Show 20 Lines | static void NotifyHeaderTip() { | ||||
} | } | ||||
// Send block tip changed notifications without cs_main | // Send block tip changed notifications without cs_main | ||||
if (fNotify) { | if (fNotify) { | ||||
uiInterface.NotifyHeaderTip(fInitialBlockDownload, pindexHeader); | uiInterface.NotifyHeaderTip(fInitialBlockDownload, pindexHeader); | ||||
} | } | ||||
} | } | ||||
/** | |||||
* Make the best chain active, in multiple steps. The result is either failure | |||||
* or an activated best chain. pblock is either nullptr or a pointer to a block | |||||
* that is already loaded (to avoid loading it again from disk). | |||||
*/ | |||||
bool CChainState::ActivateBestChain(const Config &config, | bool CChainState::ActivateBestChain(const Config &config, | ||||
CValidationState &state, | CValidationState &state, | ||||
std::shared_ptr<const CBlock> pblock) { | std::shared_ptr<const CBlock> pblock) { | ||||
// Note that while we're often called here from ProcessNewBlock, this is | // Note that while we're often called here from ProcessNewBlock, this is | ||||
// far from a guarantee. Things in the P2P/RPC will often end up calling | // far from a guarantee. Things in the P2P/RPC will often end up calling | ||||
// us in the middle of ProcessNewBlock - do not assume pblock is set | // us in the middle of ProcessNewBlock - do not assume pblock is set | ||||
// sanely for performance or correctness! | // sanely for performance or correctness! | ||||
AssertLockNotHeld(cs_main); | AssertLockNotHeld(cs_main); | ||||
▲ Show 20 Lines • Show All 2,864 Lines • Show Last 20 Lines |