Changeset View
Changeset View
Standalone View
Standalone View
src/node/blockstorage.cpp
Show First 20 Lines • Show All 920 Lines • ▼ Show 20 Lines | ScheduleBatchPriority(); | ||||
LOCK(cs_main); | LOCK(cs_main); | ||||
CBlockIndex *pblockindex = | CBlockIndex *pblockindex = | ||||
chainman.m_blockman.LookupBlockIndex(hash); | chainman.m_blockman.LookupBlockIndex(hash); | ||||
if (pblockindex && !pblockindex->nStatus.isValid()) { | if (pblockindex && !pblockindex->nStatus.isValid()) { | ||||
LogPrintf("Reconsidering checkpointed block %s ...\n", | LogPrintf("Reconsidering checkpointed block %s ...\n", | ||||
hash.GetHex()); | hash.GetHex()); | ||||
chainman.ActiveChainstate().ResetBlockFailureFlags(pblockindex); | chainman.ActiveChainstate().ResetBlockFailureFlags(pblockindex); | ||||
} | } | ||||
if (pblockindex && pblockindex->nStatus.isOnParkedChain()) { | |||||
LogPrintf("Unparking checkpointed block %s ...\n", | |||||
hash.GetHex()); | |||||
chainman.ActiveChainstate().UnparkBlockAndChildren(pblockindex); | |||||
} | |||||
} | } | ||||
// scan for better chains in the block chain database, that are not yet | // scan for better chains in the block chain database, that are not yet | ||||
// connected in the active best chain | // connected in the active best chain | ||||
// We can't hold cs_main during ActivateBestChain even though we're | // We can't hold cs_main during ActivateBestChain even though we're | ||||
// accessing the chainman unique_ptrs since ABC requires us not to be | // accessing the chainman unique_ptrs since ABC requires us not to be | ||||
// holding cs_main, so retrieve the relevant pointers before the ABC | // holding cs_main, so retrieve the relevant pointers before the ABC | ||||
Show All 22 Lines |