From 4649292ae347aa5e0abcd330ed3a12cb7c94ab75 Mon Sep 17 00:00:00 2001 From: Jonas Schnelli Date: Thu, 20 Oct 2016 18:53:05 +0200 Subject: [PATCH] Use pindexBestHeader instead of setBlockIndexCandidates for NotifyHeaderTip() --- src/main.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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();