diff --git a/src/main.cpp b/src/main.cpp index 0dc69f323..1872e060c 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -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();