aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorJonas Schnelli <dev@jonasschnelli.ch>2016-10-20 18:53:05 +0200
committerJonas Schnelli <dev@jonasschnelli.ch>2016-10-20 19:02:48 +0200
commit0a261b63fd4f1b07431f8a65762ef9f1ef1c11c8 (patch)
tree01b3883c657923616d1d80a6d2d8a68cc16954e7 /src/main.cpp
parentf2d705629b510e2a5b25c8ecac1898fed13a16a2 (diff)
Use pindexBestHeader instead of setBlockIndexCandidates for NotifyHeaderTip()
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 50158b4687..8c95f36db2 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();