From 5ce5e35580cf770728e9565d5f3b82899054c3b2 Mon Sep 17 00:00:00 2001 From: UdjinM6 Date: Thu, 11 Feb 2021 19:36:54 +0300 Subject: [PATCH] qt: Change Node Type to recognize 3 types: Regular, Masternode and Verified Masternode (#3995) --- src/qt/rpcconsole.cpp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/qt/rpcconsole.cpp b/src/qt/rpcconsole.cpp index e5a65bfa50..82edec9ea6 100644 --- a/src/qt/rpcconsole.cpp +++ b/src/qt/rpcconsole.cpp @@ -1240,13 +1240,17 @@ void RPCConsole::updateNodeDetail(const CNodeCombinedStats *stats) ui->peerDirection->setText(stats->nodeStats.fInbound ? tr("Inbound") : tr("Outbound")); ui->peerHeight->setText(QString("%1").arg(QString::number(stats->nodeStats.nStartingHeight))); ui->peerWhitelisted->setText(stats->nodeStats.fWhitelisted ? tr("Yes") : tr("No")); - if (stats->nodeStats.verifiedProRegTxHash.IsNull()) { - ui->peerNodeType->setText(tr("Normal")); + auto dmn = clientModel->getMasternodeList().GetMNByService(stats->nodeStats.addr); + if (dmn == nullptr) { + ui->peerNodeType->setText(tr("Regular")); ui->peerPoSeScore->setText(tr("N/A")); } else { - ui->peerNodeType->setText(tr("Masternode")); - auto dmn = clientModel->getMasternodeList().GetMNByService(stats->nodeStats.addr); - ui->peerPoSeScore->setText(dmn == nullptr ? tr("N/A") : QString::number(dmn->pdmnState->nPoSePenalty)); + if (stats->nodeStats.verifiedProRegTxHash.IsNull()) { + ui->peerNodeType->setText(tr("Masternode")); + } else { + ui->peerNodeType->setText(tr("Verified Masternode")); + } + ui->peerPoSeScore->setText(QString::number(dmn->pdmnState->nPoSePenalty)); } // This check fails for example if the lock was busy and