@@ -2472,6 +2472,8 @@ void CChainState::PruneBlockIndexCandidates() {
2472
2472
/* *
2473
2473
* Try to make some progress towards making pindexMostWork the active block.
2474
2474
* pblock is either nullptr or a pointer to a CBlock corresponding to pindexMostWork.
2475
+ *
2476
+ * @returns true unless a system error occurred
2475
2477
*/
2476
2478
bool CChainState::ActivateBestChainStep (CValidationState& state, const CChainParams& chainparams, CBlockIndex* pindexMostWork, const std::shared_ptr<const CBlock>& pblock, bool & fInvalidFound , ConnectTrace& connectTrace)
2477
2479
{
@@ -2598,6 +2600,8 @@ static void LimitValidationInterfaceQueue() LOCKS_EXCLUDED(cs_main) {
2598
2600
* ActivateBestChain is split into steps (see ActivateBestChainStep) so that
2599
2601
* we avoid holding cs_main for an extended period of time; the length of this
2600
2602
* call may be quite long during reindexing or a substantial reorg.
2603
+ *
2604
+ * @returns true unless a system error occurred
2601
2605
*/
2602
2606
bool CChainState::ActivateBestChain (CValidationState &state, const CChainParams& chainparams, std::shared_ptr<const CBlock> pblock) {
2603
2607
// Note that while we're often called here from ProcessNewBlock, this is
@@ -2646,8 +2650,10 @@ bool CChainState::ActivateBestChain(CValidationState &state, const CChainParams&
2646
2650
2647
2651
bool fInvalidFound = false ;
2648
2652
std::shared_ptr<const CBlock> nullBlockPtr;
2649
- if (!ActivateBestChainStep (state, chainparams, pindexMostWork, pblock && pblock->GetHash () == pindexMostWork->GetBlockHash () ? pblock : nullBlockPtr, fInvalidFound , connectTrace))
2653
+ if (!ActivateBestChainStep (state, chainparams, pindexMostWork, pblock && pblock->GetHash () == pindexMostWork->GetBlockHash () ? pblock : nullBlockPtr, fInvalidFound , connectTrace)) {
2654
+ // A system error occurred
2650
2655
return false ;
2656
+ }
2651
2657
blocks_connected = true ;
2652
2658
2653
2659
if (fInvalidFound ) {
0 commit comments