Use pindexBestHeader instead of setBlockIndexCandidates for NotifyHeaderTip()

This commit is contained in:
Jonas Schnelli 2016-10-20 18:53:05 +02:00
parent f2d705629b
commit 0a261b63fd
No known key found for this signature in database
GPG Key ID: 29D4BCB6416F53EC
1 changed files with 2 additions and 3 deletions

View File

@ -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();