Merge 1f8378508a into merged_master (Bitcoin PR #15615)

This commit is contained in:
Andrew Poelstra 2020-11-09 21:20:19 +00:00
commit 5deb2c636f

View file

@ -3689,6 +3689,12 @@ bool ProcessNewBlockHeaders(const std::vector<CBlockHeader>& headers, CValidatio
}
}
NotifyHeaderTip();
{
LOCK(cs_main);
if (::ChainstateActive().IsInitialBlockDownload() && ppindex && *ppindex) {
LogPrintf("Synchronizing blockheaders, height: %d (~%.2f%%)\n", (*ppindex)->nHeight, 100.0/((*ppindex)->nHeight+(GetAdjustedTime() - (*ppindex)->GetBlockTime()) / Params().GetConsensus().nPowTargetSpacing) * (*ppindex)->nHeight);
}
}
return true;
}