Skip to content

Commit

Permalink
Send tip change notification from invalidateblock
Browse files Browse the repository at this point in the history
This change is needed to prevent sync_blocks timeouts in the mempool_reorg
test after the sync_blocks update in the upcoming commit
"[qa] Change sync_blocks to pick smarter maxheight".

This change was initially suggested by Suhas Daftuar <sdaftuar@chaincode.com>
in bitcoin#8680 (comment)

Github-Pull: bitcoin#9196
Rebased-From: 67c6326
  • Loading branch information
ryanofsky authored and luke-jr committed Dec 2, 2016
1 parent 6f7841c commit 0c09d9f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/main.cpp
Expand Up @@ -3176,6 +3176,7 @@ bool InvalidateBlock(CValidationState& state, const CChainParams& chainparams, C

InvalidChainFound(pindex);
mempool.removeForReorg(pcoinsTip, chainActive.Tip()->nHeight + 1, STANDARD_LOCKTIME_VERIFY_FLAGS);
uiInterface.NotifyBlockTip(IsInitialBlockDownload(), pindex->pprev);
return true;
}

Expand Down

0 comments on commit 0c09d9f

Please sign in to comment.