Skip to content

Commit

Permalink
Add comment to describe callers to ActivateBestChain
Browse files Browse the repository at this point in the history
  • Loading branch information
TheBlueMatt committed Jan 12, 2017
1 parent 962f7f0 commit 73666ad
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/validation.cpp
Expand Up @@ -2388,6 +2388,11 @@ static void NotifyHeaderTip() {
* that is already loaded (to avoid loading it again from disk).
*/
bool ActivateBestChain(CValidationState &state, const CChainParams& chainparams, std::shared_ptr<const CBlock> pblock) {
// 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
// us in the middle of ProcessNewBlock - do not assume pblock is set
// sanely for performance or correctness!

CBlockIndex *pindexMostWork = NULL;
CBlockIndex *pindexNewTip = NULL;
do {
Expand Down

0 comments on commit 73666ad

Please sign in to comment.