mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-06-03 19:51:32 +02:00
refactor: Avoid locking cs_main in ProcessNewBlockHeaders
This commit is contained in:
parent
dcc448e3d2
commit
3109a1f948
@ -3402,7 +3402,6 @@ bool ProcessNewBlockHeaders(const std::vector<CBlockHeader>& headers, CValidatio
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (NotifyHeaderTip()) {
|
if (NotifyHeaderTip()) {
|
||||||
LOCK(cs_main);
|
|
||||||
if (::ChainstateActive().IsInitialBlockDownload() && ppindex && *ppindex) {
|
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);
|
LogPrintf("Synchronizing blockheaders, height: %d (~%.2f%%)\n", (*ppindex)->nHeight, 100.0/((*ppindex)->nHeight+(GetAdjustedTime() - (*ppindex)->GetBlockTime()) / Params().GetConsensus().nPowTargetSpacing) * (*ppindex)->nHeight);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user