Changeset View
Changeset View
Standalone View
Standalone View
src/validation.cpp
Show First 20 Lines • Show All 2,901 Lines • ▼ Show 20 Lines | bool CChainState::ActivateBestChain(const Config &config, | ||||
int nStopAtHeight = gArgs.GetArg("-stopatheight", DEFAULT_STOPATHEIGHT); | int nStopAtHeight = gArgs.GetArg("-stopatheight", DEFAULT_STOPATHEIGHT); | ||||
do { | do { | ||||
boost::this_thread::interruption_point(); | boost::this_thread::interruption_point(); | ||||
if (GetMainSignals().CallbacksPending() > 10) { | if (GetMainSignals().CallbacksPending() > 10) { | ||||
// Block until the validation queue drains. This should largely | // Block until the validation queue drains. This should largely | ||||
// never happen in normal operation, however may happen during | // never happen in normal operation, however may happen during | ||||
// reindex, causing memory blowup if we run too far ahead. | // reindex, causing memory blowup if we run too far ahead. | ||||
// Note that if a validationinterface callback ends up calling | |||||
// ActivateBestChain this may lead to a deadlock! We should | |||||
// probably have a DEBUG_LOCKORDER test for this in the future. | |||||
SyncWithValidationInterfaceQueue(); | SyncWithValidationInterfaceQueue(); | ||||
} | } | ||||
{ | { | ||||
LOCK(cs_main); | LOCK(cs_main); | ||||
CBlockIndex *starting_tip = chainActive.Tip(); | CBlockIndex *starting_tip = chainActive.Tip(); | ||||
bool blocks_connected = false; | bool blocks_connected = false; | ||||
do { | do { | ||||
▲ Show 20 Lines • Show All 2,840 Lines • Show Last 20 Lines |