Avoid unnecessary "Synchronizing blockheaders" log messages
This commit is contained in:
parent
495db72ee7
commit
dcc448e3d2
1 changed files with 3 additions and 3 deletions
|
@ -2561,7 +2561,7 @@ bool CChainState::ActivateBestChainStep(CValidationState& state, const CChainPar
|
|||
return true;
|
||||
}
|
||||
|
||||
static void NotifyHeaderTip() LOCKS_EXCLUDED(cs_main) {
|
||||
static bool NotifyHeaderTip() LOCKS_EXCLUDED(cs_main) {
|
||||
bool fNotify = false;
|
||||
bool fInitialBlockDownload = false;
|
||||
static CBlockIndex* pindexHeaderOld = nullptr;
|
||||
|
@ -2580,6 +2580,7 @@ static void NotifyHeaderTip() LOCKS_EXCLUDED(cs_main) {
|
|||
if (fNotify) {
|
||||
uiInterface.NotifyHeaderTip(fInitialBlockDownload, pindexHeader);
|
||||
}
|
||||
return fNotify;
|
||||
}
|
||||
|
||||
static void LimitValidationInterfaceQueue() LOCKS_EXCLUDED(cs_main) {
|
||||
|
@ -3400,8 +3401,7 @@ bool ProcessNewBlockHeaders(const std::vector<CBlockHeader>& headers, CValidatio
|
|||
}
|
||||
}
|
||||
}
|
||||
NotifyHeaderTip();
|
||||
{
|
||||
if (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);
|
||||
|
|
Loading…
Add table
Reference in a new issue