#86 - Fix sync percentage

This commit is contained in:
Aditya Kulkarni
2019-01-02 10:26:11 -08:00
parent 4f4d6efe3b
commit bf677ddb44

View File

@@ -582,8 +582,10 @@ void RPC::getInfoThenRefresh(bool force) {
QString txt = QString::number(blockNumber);
if (estimatedheight > 0) {
txt = txt % " / ~" % QString::number(estimatedheight);
txt = txt % " ( " % QString::number((double)blockNumber / (double)estimatedheight * 100, 'f', 0) % "% )";
} else {
txt = txt % " ( " % QString::number(progress * 100, 'f', 0) % "% )";
}
txt = txt % " ( " % QString::number(progress * 100, 'f', 0) % "% )";
ui->blockheight->setText(txt);
ui->heightLabel->setText(QObject::tr("Downloading blocks"));
} else {