aboutsummaryrefslogtreecommitdiff
path: root/src/qt/rpcconsole.cpp
diff options
context:
space:
mode:
authorJon Atack <jon@atack.com>2021-01-30 23:54:12 +0100
committerJon Atack <jon@atack.com>2021-02-18 11:17:07 +0100
commit142807af8b82e2372a03df893c50df4f4a96aca4 (patch)
treeb567b9a1300777f57b03bbcc8f5f640442ed72e8 /src/qt/rpcconsole.cpp
parent9476886353dffb730dcb75799f2bd5e143425795 (diff)
downloadbitcoin-142807af8b82e2372a03df893c50df4f4a96aca4.tar.xz
gui: display BIP152 high bandwidth relay in peer details
Diffstat (limited to 'src/qt/rpcconsole.cpp')
-rw-r--r--src/qt/rpcconsole.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/qt/rpcconsole.cpp b/src/qt/rpcconsole.cpp
index 52ebfb16b7..76ed9ca6b9 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));
@@ -1110,6 +1115,11 @@ void RPCConsole::updateDetailWidget()
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));