Skip to content

Commit d75e704

Browse files
committed
Add log output during initial header sync
1 parent 431d81b commit d75e704

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/validation.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3327,6 +3327,12 @@ bool ProcessNewBlockHeaders(const std::vector<CBlockHeader>& headers, CValidatio
33273327
}
33283328
}
33293329
NotifyHeaderTip();
3330+
{
3331+
LOCK(cs_main);
3332+
if (::ChainstateActive().IsInitialBlockDownload() && ppindex && *ppindex) {
3333+
LogPrintf("Synchronizing blockheaders, height: %d (~%.2f%%)\n", (*ppindex)->nHeight, 100.0/((*ppindex)->nHeight+(GetAdjustedTime() - (*ppindex)->GetBlockTime()) / Params().GetConsensus().nPowTargetSpacing) * (*ppindex)->nHeight);
3334+
}
3335+
}
33303336
return true;
33313337
}
33323338

0 commit comments

Comments
 (0)