From 9476886353dffb730dcb75799f2bd5e143425795 Mon Sep 17 00:00:00 2001 From: Jon Atack Date: Sat, 30 Jan 2021 22:09:40 +0100 Subject: gui: display fRelayTxes in peer details --- src/qt/forms/debugwindow.ui | 78 ++++++++++++++++++++++++++++++--------------- src/qt/rpcconsole.cpp | 1 + 2 files changed, 53 insertions(+), 26 deletions(-) (limited to 'src/qt') diff --git a/src/qt/forms/debugwindow.ui b/src/qt/forms/debugwindow.ui index 3831852185..769da4b45b 100644 --- a/src/qt/forms/debugwindow.ui +++ b/src/qt/forms/debugwindow.ui @@ -1198,13 +1198,39 @@ + + + Whether the peer requested us to relay transactions. + + + Wants Tx Relay + + + + + + + IBeamCursor + + + N/A + + + Qt::PlainText + + + Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse + + + + Starting Block - + IBeamCursor @@ -1220,14 +1246,14 @@ - + Synced Headers - + IBeamCursor @@ -1243,14 +1269,14 @@ - + Synced Blocks - + IBeamCursor @@ -1266,14 +1292,14 @@ - + Connection Time - + IBeamCursor @@ -1289,14 +1315,14 @@ - + Last Send - + IBeamCursor @@ -1312,14 +1338,14 @@ - + Last Receive - + IBeamCursor @@ -1335,14 +1361,14 @@ - + Sent - + IBeamCursor @@ -1358,14 +1384,14 @@ - + Received - + IBeamCursor @@ -1381,14 +1407,14 @@ - + Ping Time - + IBeamCursor @@ -1404,7 +1430,7 @@ - + The duration of a currently outstanding ping. @@ -1414,7 +1440,7 @@ - + IBeamCursor @@ -1430,14 +1456,14 @@ - + Min Ping - + IBeamCursor @@ -1453,14 +1479,14 @@ - + Time Offset - + IBeamCursor @@ -1476,7 +1502,7 @@ - + The mapped Autonomous System used for diversifying peer selection. @@ -1486,7 +1512,7 @@ - + IBeamCursor @@ -1502,7 +1528,7 @@ - + Qt::Vertical diff --git a/src/qt/rpcconsole.cpp b/src/qt/rpcconsole.cpp index 2758ee351a..52ebfb16b7 100644 --- a/src/qt/rpcconsole.cpp +++ b/src/qt/rpcconsole.cpp @@ -1109,6 +1109,7 @@ void RPCConsole::updateDetailWidget() peerAddrDetails += "
" + 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"); 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)); -- cgit v1.2.3 From 142807af8b82e2372a03df893c50df4f4a96aca4 Mon Sep 17 00:00:00 2001 From: Jon Atack Date: Sat, 30 Jan 2021 23:54:12 +0100 Subject: gui: display BIP152 high bandwidth relay in peer details --- src/qt/forms/debugwindow.ui | 78 ++++++++++++++++++++++++++++++--------------- src/qt/rpcconsole.cpp | 10 ++++++ 2 files changed, 62 insertions(+), 26 deletions(-) (limited to 'src/qt') diff --git a/src/qt/forms/debugwindow.ui b/src/qt/forms/debugwindow.ui index 769da4b45b..e4838b60f4 100644 --- a/src/qt/forms/debugwindow.ui +++ b/src/qt/forms/debugwindow.ui @@ -1224,13 +1224,39 @@
+ + + High bandwidth BIP152 compact block relay: %1 + + + High Bandwidth + + + + + + + IBeamCursor + + + N/A + + + Qt::PlainText + + + Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse + + + + Starting Block - + IBeamCursor @@ -1246,14 +1272,14 @@ - + Synced Headers - + IBeamCursor @@ -1269,14 +1295,14 @@ - + Synced Blocks - + IBeamCursor @@ -1292,14 +1318,14 @@ - + Connection Time - + IBeamCursor @@ -1315,14 +1341,14 @@ - + Last Send - + IBeamCursor @@ -1338,14 +1364,14 @@ - + Last Receive - + IBeamCursor @@ -1361,14 +1387,14 @@ - + Sent - + IBeamCursor @@ -1384,14 +1410,14 @@ - + Received - + IBeamCursor @@ -1407,14 +1433,14 @@ - + Ping Time - + IBeamCursor @@ -1430,7 +1456,7 @@ - + The duration of a currently outstanding ping. @@ -1440,7 +1466,7 @@ - + IBeamCursor @@ -1456,14 +1482,14 @@ - + Min Ping - + IBeamCursor @@ -1479,14 +1505,14 @@ - + Time Offset - + IBeamCursor @@ -1502,7 +1528,7 @@ - + The mapped Autonomous System used for diversifying peer selection. @@ -1512,7 +1538,7 @@ - + IBeamCursor @@ -1528,7 +1554,7 @@ - + Qt::Vertical 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{"
  • " + 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)); @@ -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)); -- cgit v1.2.3