Skip to content

Commit 66331f2

Browse files
author
Philip Kaufmann
committed
if there is no current block number available display N/A on totalBlocks label, instead of 0, which can not ever be true
1 parent a8fef7f commit 66331f2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/qt/rpcconsole.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,8 @@ void RPCConsole::setNumBlocks(int count)
232232
ui->numberOfBlocks->setText(QString::number(count));
233233
if(clientModel)
234234
{
235-
ui->totalBlocks->setText(QString::number(clientModel->getNumBlocksOfPeers()));
235+
// If there is no current number available display N/A instead of 0, which can't ever be true
236+
ui->totalBlocks->setText(clientModel->getNumBlocksOfPeers() == 0 ? tr("N/A") : QString::number(clientModel->getNumBlocksOfPeers()));
236237
ui->lastBlockTime->setText(clientModel->getLastBlockDate().toString());
237238
}
238239
}

0 commit comments

Comments
 (0)