aboutsummaryrefslogtreecommitdiff
path: root/src/qt/rpcconsole.cpp
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2021-02-22 08:19:06 +0100
committerMarcoFalke <falke.marco@gmail.com>2021-02-22 08:19:53 +0100
commit08eec6907a0f7f3088605294681673cc8541350e (patch)
tree6b850ba1ea4194b9e677d80b4270de6569765fd4 /src/qt/rpcconsole.cpp
parent0e9596c86007f35a7d8585906012264724298b05 (diff)
parent142807af8b82e2372a03df893c50df4f4a96aca4 (diff)
downloadbitcoin-08eec6907a0f7f3088605294681673cc8541350e.tar.xz
Merge bitcoin-core/gui#206: Display fRelayTxes and bip152_highbandwidth_{to, from} in peer details
142807af8b82e2372a03df893c50df4f4a96aca4 gui: display BIP152 high bandwidth relay in peer details (Jon Atack) 9476886353dffb730dcb75799f2bd5e143425795 gui: display fRelayTxes in peer details (Jon Atack) Pull request description: This pull adds two fields to the peer details, "Wants Tx Relay" (fRelayTxes) and "High Bandwidth" (bip152_highbandwidth to/from). See the added tooltips for more info. ACKs for top commit: MarcoFalke: review ACK 142807af8b82e2372a03df893c50df4f4a96aca4 jarolrod: ACK 142807af8b82e2372a03df893c50df4f4a96aca4 Tree-SHA512: 956c7fa54c9c2ea76ee879d370711be0bed4af05484a17d35a1dd77713ed34ff441ed3957d0ef3a7ca7cf59a2f5d898be49b12af609a16b3e3cbfc4a1ba8f54e
Diffstat (limited to 'src/qt/rpcconsole.cpp')
-rw-r--r--src/qt/rpcconsole.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/qt/rpcconsole.cpp b/src/qt/rpcconsole.cpp
index 7c8de962c6..4a4b557acc 100644
--- a/src/qt/rpcconsole.cpp
+++ b/src/qt/rpcconsole.cpp
@@ -473,6 +473,11 @@ RPCConsole::RPCConsole(interfaces::Node& node, const PlatformStyle *_platformSty
tr("Outbound Address Fetch: short-lived, for soliciting addresses")};
const QString list{"<ul><li>" + Join(CONNECTION_TYPE_DOC, QString("</li><li>")) + "</li></ul>"};
ui->peerConnectionTypeLabel->setToolTip(ui->peerConnectionTypeLabel->toolTip().arg(list));
+ const QString hb_list{"<ul><li>\""
+ + tr("To") + "\" – " + tr("we selected the peer for high bandwidth relay") + "</li><li>\""
+ + tr("From") + "\" – " + tr("the peer selected us for high bandwidth relay") + "</li><li>\""
+ + tr("No") + "\" – " + tr("no high bandwidth relay selected") + "</li></ul>"};
+ ui->peerHighBandwidthLabel->setToolTip(ui->peerHighBandwidthLabel->toolTip().arg(hb_list));
ui->dataDir->setToolTip(ui->dataDir->toolTip().arg(QString(nonbreaking_hyphen) + "datadir"));
ui->blocksDir->setToolTip(ui->blocksDir->toolTip().arg(QString(nonbreaking_hyphen) + "blocksdir"));
ui->openDebugLogfileButton->setToolTip(ui->openDebugLogfileButton->toolTip().arg(PACKAGE_NAME));
@@ -1109,6 +1114,12 @@ void RPCConsole::updateDetailWidget()
peerAddrDetails += "<br />" + tr("via %1").arg(QString::fromStdString(stats->nodeStats.addrLocal));
ui->peerHeading->setText(peerAddrDetails);
ui->peerServices->setText(GUIUtil::formatServicesStr(stats->nodeStats.nServices));
+ ui->peerRelayTxes->setText(stats->nodeStats.fRelayTxes ? "Yes" : "No");
+ QString bip152_hb_settings;
+ if (stats->nodeStats.m_bip152_highbandwidth_to) bip152_hb_settings += "To";
+ if (stats->nodeStats.m_bip152_highbandwidth_from) bip152_hb_settings += (bip152_hb_settings == "" ? "From" : "/From");
+ if (bip152_hb_settings == "") bip152_hb_settings = "No";
+ ui->peerHighBandwidth->setText(bip152_hb_settings);
ui->peerLastSend->setText(stats->nodeStats.nLastSend ? GUIUtil::formatDurationStr(GetSystemTimeInSeconds() - stats->nodeStats.nLastSend) : tr("never"));
ui->peerLastRecv->setText(stats->nodeStats.nLastRecv ? GUIUtil::formatDurationStr(GetSystemTimeInSeconds() - stats->nodeStats.nLastRecv) : tr("never"));
ui->peerBytesSent->setText(GUIUtil::formatBytes(stats->nodeStats.nSendBytes));