Skip to content

Commit 1f83785

Browse files
committed
Merge #15615: Add log output during initial header sync
d75e704 Add log output during initial header sync (Jonas Schnelli) Pull request description: The non debug log output is completely quiet during the header sync. I see two main reasons to add infos about the state of the initial header sync... * users may think the node did fail to start sync * it's a little complicate to check if your getting throttled during header sync (repeatedly calling `getchaintips` or similar) ACKs for top commit: fanquake: Concept ACK bitcoin/bitcoin@d75e704 practicalswift: utACK d75e704 laanwj: Tested ACK d75e704 Tree-SHA512: 2e738571b703d7251290864603c3a829729645962c2fa3187250bab0585e66a5f01fce892e9b5b98da451fab2b40a2e4784f9b2e5a9cad75ff62c535affe7430
2 parents d20d171 + d75e704 commit 1f83785

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
@@ -3401,6 +3401,12 @@ bool ProcessNewBlockHeaders(const std::vector<CBlockHeader>& headers, CValidatio
34013401
}
34023402
}
34033403
NotifyHeaderTip();
3404+
{
3405+
LOCK(cs_main);
3406+
if (::ChainstateActive().IsInitialBlockDownload() && ppindex && *ppindex) {
3407+
LogPrintf("Synchronizing blockheaders, height: %d (~%.2f%%)\n", (*ppindex)->nHeight, 100.0/((*ppindex)->nHeight+(GetAdjustedTime() - (*ppindex)->GetBlockTime()) / Params().GetConsensus().nPowTargetSpacing) * (*ppindex)->nHeight);
3408+
}
3409+
}
34043410
return true;
34053411
}
34063412

0 commit comments

Comments
 (0)