Skip to content

Commit

Permalink
Bugfix: GUI: Debug info: Use correct "kB" case for small mempool size…
Browse files Browse the repository at this point in the history
…s, and make translation-friendly
  • Loading branch information
luke-jr authored and hebasto committed Mar 31, 2023
1 parent dacc322 commit 08b8b28
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/qt/rpcconsole.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -984,10 +984,11 @@ void RPCConsole::setMempoolSize(long numberOfTxs, size_t dynUsage)
{
ui->mempoolNumberTxs->setText(QString::number(numberOfTxs));

if (dynUsage < 1000000)
ui->mempoolSize->setText(QString::number(dynUsage/1000.0, 'f', 2) + " KB");
else
ui->mempoolSize->setText(QString::number(dynUsage/1000000.0, 'f', 2) + " MB");
if (dynUsage < 1000000) {
ui->mempoolSize->setText(QObject::tr("%1 kB").arg(dynUsage / 1000.0, 0, 'f', 2));
} else {
ui->mempoolSize->setText(QObject::tr("%1 MB").arg(dynUsage / 1000000.0, 0, 'f', 2));
}
}

void RPCConsole::on_lineEdit_returnPressed()
Expand Down

0 comments on commit 08b8b28

Please sign in to comment.