From 1cbf3b9a53e09d36df89c14690b699aa282e1ec0 Mon Sep 17 00:00:00 2001 From: Kittywhiskers Van Gogh <63189531+kwvg@users.noreply.github.com> Date: Sun, 9 Jun 2024 11:28:00 +0000 Subject: [PATCH] merge bitcoin-core/gui#206: Display fRelayTxes and bip152_highbandwidth_{to, from} in peer details continuation of 3e8ba24c87e32c2669c7be6924e750e29805a30e from dash#5964 includes: - 142807af8b82e2372a03df893c50df4f4a96aca4 --- src/qt/forms/debugwindow.ui | 98 +++++++++++++++++++++++-------------- src/qt/rpcconsole.cpp | 10 ++++ 2 files changed, 72 insertions(+), 36 deletions(-) diff --git a/src/qt/forms/debugwindow.ui b/src/qt/forms/debugwindow.ui index 6e79ad9d2c596..d6ea9fd3eb0af 100644 --- a/src/qt/forms/debugwindow.ui +++ b/src/qt/forms/debugwindow.ui @@ -1150,13 +1150,39 @@ + + + High bandwidth BIP152 compact block relay: %1 + + + High Bandwidth + + + + + + + IBeamCursor + + + N/A + + + Qt::PlainText + + + Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse + + + + Starting Block - + IBeamCursor @@ -1172,14 +1198,14 @@ - + Synced Headers - + IBeamCursor @@ -1195,14 +1221,14 @@ - + Synced Blocks - + IBeamCursor @@ -1218,14 +1244,14 @@ - + Connection Time - + IBeamCursor @@ -1241,7 +1267,7 @@ - + Elapsed time since a novel block passing initial validity checks was received from this peer. @@ -1251,7 +1277,7 @@ - + IBeamCursor @@ -1267,7 +1293,7 @@ - + Elapsed time since a novel transaction accepted into our mempool was received from this peer. @@ -1277,7 +1303,7 @@ - + IBeamCursor @@ -1293,14 +1319,14 @@ - + Last Send - + IBeamCursor @@ -1316,14 +1342,14 @@ - + Last Receive - + IBeamCursor @@ -1339,14 +1365,14 @@ - + Sent - + IBeamCursor @@ -1362,14 +1388,14 @@ - + Received - + IBeamCursor @@ -1385,14 +1411,14 @@ - + Ping Time - + IBeamCursor @@ -1408,7 +1434,7 @@ - + The duration of a currently outstanding ping. @@ -1418,7 +1444,7 @@ - + IBeamCursor @@ -1434,14 +1460,14 @@ - + Min Ping - + IBeamCursor @@ -1457,14 +1483,14 @@ - + Time Offset - + IBeamCursor @@ -1480,7 +1506,7 @@ - + The mapped Autonomous System used for diversifying peer selection. @@ -1490,7 +1516,7 @@ - + IBeamCursor @@ -1506,7 +1532,7 @@ - + Whether we relay addresses to this peer. @@ -1516,7 +1542,7 @@ - + IBeamCursor @@ -1532,7 +1558,7 @@ - + Total number of addresses processed, excluding those dropped due to rate-limiting. @@ -1542,7 +1568,7 @@ - + IBeamCursor @@ -1558,7 +1584,7 @@ - + Total number of addresses dropped due to rate-limiting. @@ -1568,7 +1594,7 @@ - + IBeamCursor @@ -1584,7 +1610,7 @@ - + Qt::Vertical diff --git a/src/qt/rpcconsole.cpp b/src/qt/rpcconsole.cpp index f15dce30e2cc7..c31c6b1ba7606 100644 --- a/src/qt/rpcconsole.cpp +++ b/src/qt/rpcconsole.cpp @@ -514,6 +514,11 @@ RPCConsole::RPCConsole(interfaces::Node& node, QWidget* parent, Qt::WindowFlags tr("Outbound Address Fetch: short-lived, for soliciting addresses")}; const QString list{"
  • " + Join(CONNECTION_TYPE_DOC, QString("
  • ")) + "
"}; ui->peerConnectionTypeLabel->setToolTip(ui->peerConnectionTypeLabel->toolTip().arg(list)); + const QString hb_list{"
  • \"" + + tr("To") + "\" – " + tr("we selected the peer for high bandwidth relay") + "
  • \"" + + tr("From") + "\" – " + tr("the peer selected us for high bandwidth relay") + "
  • \"" + + tr("No") + "\" – " + tr("no high bandwidth relay selected") + "
"}; + 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)); @@ -1279,6 +1284,11 @@ void RPCConsole::updateDetailWidget() ui->peerConnTime->setText(GUIUtil::formatDurationStr(time_now - std::chrono::seconds{stats->nodeStats.nTimeConnected})); ui->peerLastBlock->setText(TimeDurationField(time_now, std::chrono::seconds{stats->nodeStats.nLastBlockTime})); ui->peerLastTx->setText(TimeDurationField(time_now, std::chrono::seconds{stats->nodeStats.nLastTXTime})); + 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(TimeDurationField(time_now, stats->nodeStats.m_last_send)); ui->peerLastRecv->setText(TimeDurationField(time_now, stats->nodeStats.m_last_recv)); ui->peerBytesSent->setText(GUIUtil::formatBytes(stats->nodeStats.nSendBytes));