refactor: Avoid locking cs_main in ProcessNewBlockHeaders

This commit is contained in:
João Barbosa committed 2019-09-06 00:38:53 +01:00
1 parent dcc448e3d2
commit 3109a1f948
1 file changed
-1
-1
View File
@@ -3402,7 +3402,6 @@ bool ProcessNewBlockHeaders(const std::vector<CBlockHeader>& headers, CValidatio
}
}
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);
}