During initial blocks download, also report the number of headers
This commit is contained in:
parent
ed3b473ec6
commit
fad004114a
|
@ -291,10 +291,17 @@ int printStats(bool mining)
|
|||
int downloadPercent = nSizeReindexed * 100 / nFullSizeToReindex;
|
||||
std::cout << " " << _("Reindexing blocks") << " | " << DisplaySize(nSizeReindexed) << " / " << DisplaySize(nFullSizeToReindex) << " (" << downloadPercent << "%, " << height << " " << _("blocks") << ")" << std::endl;
|
||||
} else {
|
||||
int nHeaders = currentHeadersHeight;
|
||||
if (nHeaders < 0)
|
||||
nHeaders = 0;
|
||||
int netheight = currentHeadersHeight == -1 || currentHeadersTime == 0 ?
|
||||
0 : EstimateNetHeight(params, currentHeadersHeight, currentHeadersTime);
|
||||
if (netheight < nHeaders)
|
||||
netheight = nHeaders;
|
||||
if (netheight <= 0)
|
||||
netheight = 1;
|
||||
int downloadPercent = height * 100 / netheight;
|
||||
std::cout << " " << _("Downloading blocks") << " | " << height << " / ~" << netheight << " (" << downloadPercent << "%)" << std::endl;
|
||||
std::cout << " " << _("Downloading blocks") << " | " << height << " (" << nHeaders << " " << _("headers") << ") / ~" << netheight << " (" << downloadPercent << "%)" << std::endl;
|
||||
}
|
||||
} else {
|
||||
std::cout << " " << _("Block height") << " | " << height << std::endl;
|
||||
|
|
Loading…
Reference in New Issue