From 0a261b63fd4f1b07431f8a65762ef9f1ef1c11c8 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 50158b468..8c95f36db 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -3006,9 +3006,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();