Skip to content

Commit fa912a8

Browse files
author
MarcoFalke
committed
doc: move-only ActivateBestChain doxygen comment to header
1 parent fa99efd commit fa912a8

File tree

2 files changed

+14
-12
lines changed

2 files changed

+14
-12
lines changed

src/validation.cpp

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2592,17 +2592,6 @@ static void LimitValidationInterfaceQueue() LOCKS_EXCLUDED(cs_main) {
25922592
}
25932593
}
25942594

2595-
/**
2596-
* Make the best chain active, in multiple steps. The result is either failure
2597-
* or an activated best chain. pblock is either nullptr or a pointer to a block
2598-
* that is already loaded (to avoid loading it again from disk).
2599-
*
2600-
* ActivateBestChain is split into steps (see ActivateBestChainStep) so that
2601-
* we avoid holding cs_main for an extended period of time; the length of this
2602-
* call may be quite long during reindexing or a substantial reorg.
2603-
*
2604-
* @returns true unless a system error occurred
2605-
*/
26062595
bool CChainState::ActivateBestChain(CValidationState &state, const CChainParams& chainparams, std::shared_ptr<const CBlock> pblock) {
26072596
// Note that while we're often called here from ProcessNewBlock, this is
26082597
// far from a guarantee. Things in the P2P/RPC will often end up calling

src/validation.h

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -669,7 +669,20 @@ class CChainState {
669669
//! if we pruned.
670670
void PruneAndFlush();
671671

672-
bool ActivateBestChain(CValidationState &state, const CChainParams& chainparams, std::shared_ptr<const CBlock> pblock) LOCKS_EXCLUDED(cs_main);
672+
/**
673+
* Make the best chain active, in multiple steps. The result is either failure
674+
* or an activated best chain. pblock is either nullptr or a pointer to a block
675+
* that is already loaded (to avoid loading it again from disk).
676+
*
677+
* ActivateBestChain is split into steps (see ActivateBestChainStep) so that
678+
* we avoid holding cs_main for an extended period of time; the length of this
679+
* call may be quite long during reindexing or a substantial reorg.
680+
*
681+
* @returns true unless a system error occurred
682+
*/
683+
bool ActivateBestChain(CValidationState& state,
684+
const CChainParams& chainparams,
685+
std::shared_ptr<const CBlock> pblock) LOCKS_EXCLUDED(cs_main);
673686

674687
bool AcceptBlock(const std::shared_ptr<const CBlock>& pblock, CValidationState& state, const CChainParams& chainparams, CBlockIndex** ppindex, bool fRequested, const FlatFilePos* dbp, bool* fNewBlock) EXCLUSIVE_LOCKS_REQUIRED(cs_main);
675688

0 commit comments

Comments
 (0)