qt: Change Node Type to recognize 3 types: Regular, Masternode and Verified Masternode (#3995)

This commit is contained in:
UdjinM6 2021-02-11 19:36:54 +03:00 committed by GitHub
parent 260cc09de2
commit 5ce5e35580
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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