Add log output during initial header sync

This commit is contained in:
Jonas Schnelli 2019-03-17 19:55:56 +01:00
parent 431d81b61c
commit d75e704ac0
No known key found for this signature in database
GPG key ID: 1EB776BB03C7922D

View file

@ -3327,6 +3327,12 @@ bool ProcessNewBlockHeaders(const std::vector<CBlockHeader>& headers, CValidatio
} }
} }
NotifyHeaderTip(); 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; return true;
} }