aboutsummaryrefslogtreecommitdiff
path: root/src/validation.cpp
diff options
context:
space:
mode:
authorJonas Schnelli <dev@jonasschnelli.ch>2019-03-17 19:55:56 +0100
committerJonas Schnelli <dev@jonasschnelli.ch>2019-06-13 16:38:56 +0200
commitd75e704ac08fb43320e3ebcdde0d2a5392fdec9f (patch)
treef9f77de861fb5f92c70e6acf5fa245d0de4a1db9 /src/validation.cpp
parent431d81b61ca968da2d7c25f0d56455a44cd46fed (diff)
Add log output during initial header sync
Diffstat (limited to 'src/validation.cpp')
-rw-r--r--src/validation.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/validation.cpp b/src/validation.cpp
index b2925efe32..544ad66918 100644
--- a/src/validation.cpp
+++ b/src/validation.cpp
@@ -3327,6 +3327,12 @@ bool ProcessNewBlockHeaders(const std::vector<CBlockHeader>& headers, CValidatio
}
}
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);
+ }
+ }
return true;
}