mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-13 12:33:42 +02:00
Merge 8e00a68552 into merged_master (Bitcoin PR #16774)
This commit is contained in:
commit
bbfa3115a1
1 changed files with 3 additions and 3 deletions
|
|
@ -2746,7 +2746,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;
|
||||
|
|
@ -2765,6 +2765,7 @@ static void NotifyHeaderTip() LOCKS_EXCLUDED(cs_main) {
|
|||
if (fNotify) {
|
||||
uiInterface.NotifyHeaderTip(fInitialBlockDownload, pindexHeader);
|
||||
}
|
||||
return fNotify;
|
||||
}
|
||||
|
||||
static void LimitValidationInterfaceQueue() LOCKS_EXCLUDED(cs_main) {
|
||||
|
|
@ -3684,8 +3685,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
Add a link
Reference in a new issue