mirror of
https://github.com/dashpay/dash.git
synced 2024-12-24 19:42:46 +01:00
Merge bitcoin-core/gui#34: Show permissions instead of whitelisted
784ef8be41c7e5130a6b063b359031ee1ce75aff gui: Show permissions instead of whitelisted (Wladimir J. van der Laan) Pull request description: Show detailed permissions instead of legacy "whitelisted" flag in the peer list details. These are formatted with `&` in between just like services flags. It reuses the "N/A" translation message if there are no special permissions. This removes the one-but-last use of `legacyWhitelisted`. Top commit has no ACKs. Tree-SHA512: 11982da4b9d408c74bc56bb3c540c0eb22506be6353aa4d4d6c64461d140f0587be194e2daad1612fddaa2618025a856b33928ad89041558f418f721f6abd407
This commit is contained in:
parent
d5c5a266f5
commit
4a9f382f01
@ -1005,12 +1005,12 @@
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="label_30">
|
||||
<property name="text">
|
||||
<string>Whitelisted</string>
|
||||
<string>Permissions</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="2">
|
||||
<widget class="QLabel" name="peerWhitelisted">
|
||||
<widget class="QLabel" name="peerPermissions">
|
||||
<property name="cursor">
|
||||
<cursorShape>IBeamCursor</cursorShape>
|
||||
</property>
|
||||
|
@ -1257,7 +1257,15 @@ void RPCConsole::updateNodeDetail(const CNodeCombinedStats *stats)
|
||||
: tr("Outbound block-relay"));
|
||||
ui->peerHeight->setText(QString::number(stats->nodeStats.nStartingHeight));
|
||||
ui->peerNetwork->setText(GUIUtil::NetworkToQString(stats->nodeStats.m_network));
|
||||
ui->peerWhitelisted->setText(stats->nodeStats.m_legacyWhitelisted ? tr("Yes") : tr("No"));
|
||||
if (stats->nodeStats.m_permissionFlags == PF_NONE) {
|
||||
ui->peerPermissions->setText(tr("N/A"));
|
||||
} else {
|
||||
QStringList permissions;
|
||||
for (const auto& permission : NetPermissions::ToStrings(stats->nodeStats.m_permissionFlags)) {
|
||||
permissions.append(QString::fromStdString(permission));
|
||||
}
|
||||
ui->peerPermissions->setText(permissions.join(" & "));
|
||||
}
|
||||
ui->peerMappedAS->setText(stats->nodeStats.m_mapped_as != 0 ? QString::number(stats->nodeStats.m_mapped_as) : tr("N/A"));
|
||||
auto dmn = clientModel->getMasternodeList().first.GetMNByService(stats->nodeStats.addr);
|
||||
if (dmn == nullptr) {
|
||||
|
Loading…
Reference in New Issue
Block a user