mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 12:02:48 +01:00
Merge pull request #4573 from humbleDasher/backport15615
Backport 15615, 16774, and 16793
This commit is contained in:
commit
085dbc2649
@ -3009,7 +3009,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;
|
||||
@ -3029,6 +3029,7 @@ static void NotifyHeaderTip() LOCKS_EXCLUDED(cs_main) {
|
||||
uiInterface.NotifyHeaderTip(fInitialBlockDownload, pindexHeader);
|
||||
GetMainSignals().NotifyHeaderTip(pindexHeader, fInitialBlockDownload);
|
||||
}
|
||||
return fNotify;
|
||||
}
|
||||
|
||||
static void LimitValidationInterfaceQueue() LOCKS_EXCLUDED(cs_main) {
|
||||
@ -4017,7 +4018,11 @@ bool ProcessNewBlockHeaders(const std::vector<CBlockHeader>& headers, CValidatio
|
||||
}
|
||||
}
|
||||
}
|
||||
NotifyHeaderTip();
|
||||
if (NotifyHeaderTip()) {
|
||||
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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user