diff --git a/src/mainwindow.ui b/src/mainwindow.ui index c2c32fa..fbdb01d 100644 --- a/src/mainwindow.ui +++ b/src/mainwindow.ui @@ -22,7 +22,7 @@ - 1 + 4 @@ -316,8 +316,8 @@ 0 0 - 928 - 382 + 920 + 334 @@ -772,7 +772,7 @@ - + Block height @@ -864,7 +864,7 @@ 0 0 968 - 19 + 22 diff --git a/src/rpc.cpp b/src/rpc.cpp index 4b0b8d3..8ec889f 100644 --- a/src/rpc.cpp +++ b/src/rpc.cpp @@ -526,7 +526,6 @@ void RPC::getInfoThenRefresh(bool force) { conn->doRPCIgnoreError(payload, [=](const json& reply) { qint64 solrate = reply.get(); - ui->blockheight->setText(QString::number(curBlock)); ui->numconnections->setText(QString::number(conns)); ui->solrate->setText(QString::number(solrate) % " Sol/s"); }); @@ -548,14 +547,19 @@ void RPC::getInfoThenRefresh(bool force) { Settings::getInstance()->setBlockNumber(blockNumber); // Update zcashd tab if it exists - if (ezcashd && isSyncing) { - // 895 / ~426530 (0 % ) - const qint64 genisisTimeMSec = 1477638000000; - qint64 estBlocks = (QDateTime::currentMSecsSinceEpoch() - genisisTimeMSec) / 2.5 / 60 / 1000; - // Round to nearest 10 - estBlocks = ((estBlocks + 5) / 10) * 10; - ui->blockheight->setText(ui->blockheight->text() % /*" / ~" % QString::number(estBlocks) % */ - " ( " % QString::number(progress * 100, 'f', 0) % "% )"); + if (ezcashd) { + if (isSyncing) { + const qint64 genisisTimeMSec = 1477638000000; + qint64 estBlocks = (QDateTime::currentMSecsSinceEpoch() - genisisTimeMSec) / 2.5 / 60 / 1000; + // Round to nearest 10 + estBlocks = ((estBlocks + 5) / 10) * 10; + ui->blockheight->setText(QString::number(blockNumber) % /*" / ~" % QString::number(estBlocks) % */ + " ( " % QString::number(progress * 100, 'f', 0) % "% )"); + ui->heightLabel->setText("Downloading blocks"); + } else { + ui->blockheight->setText(QString::number(blockNumber)); + ui->heightLabel->setText("Block height"); + } } // Update the status bar