Use pindexBestHeader instead of setBlockIndexCandidates for NotifyHeaderTip()

This commit is contained in:
Jonas Schnelli
2016-10-20 18:53:05 +02:00
committed by lateminer
parent 1f5a7b96be
commit 4649292ae3

View File

@@ -3052,9 +3052,8 @@ static void NotifyHeaderTip() {
CBlockIndex* pindexHeader = NULL;
{
LOCK(cs_main);
if (!setBlockIndexCandidates.empty()) {
pindexHeader = *setBlockIndexCandidates.rbegin();
}
pindexHeader = pindexBestHeader;
if (pindexHeader != pindexHeaderOld) {
fNotify = true;
fInitialBlockDownload = IsInitialBlockDownload();