aboutsummaryrefslogtreecommitdiff
path: root/src/qt
diff options
context:
space:
mode:
authorHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2023-10-03 10:18:51 +0100
committerHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2023-10-03 10:18:51 +0100
commitf08adec886febbfe038cedc32970c27c6f72bd5f (patch)
treed38f3b9e778f6178e20cc72d068225b5d51d4f5a /src/qt
parent6f882e6f8689af1f188b687c2128524880815cef (diff)
downloadbitcoin-f08adec886febbfe038cedc32970c27c6f72bd5f.tar.xz
qt: Add "Transport" label to peer details
Diffstat (limited to 'src/qt')
-rw-r--r--src/qt/forms/debugwindow.ui122
-rw-r--r--src/qt/rpcconsole.cpp15
2 files changed, 87 insertions, 50 deletions
diff --git a/src/qt/forms/debugwindow.ui b/src/qt/forms/debugwindow.ui
index f1b66341d1..5cdba64378 100644
--- a/src/qt/forms/debugwindow.ui
+++ b/src/qt/forms/debugwindow.ui
@@ -1085,6 +1085,32 @@
</widget>
</item>
<item row="2" column="0">
+ <widget class="QLabel" name="peerTransportTypeLabel">
+ <property name="toolTip">
+ <string>The transport layer version: %1</string>
+ </property>
+ <property name="text">
+ <string>Transport</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="1">
+ <widget class="QLabel" name="peerTransportType">
+ <property name="cursor">
+ <cursorShape>IBeamCursor</cursorShape>
+ </property>
+ <property name="text">
+ <string>N/A</string>
+ </property>
+ <property name="textFormat">
+ <enum>Qt::PlainText</enum>
+ </property>
+ <property name="textInteractionFlags">
+ <set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="0">
<widget class="QLabel" name="peerNetworkLabel">
<property name="toolTip">
<string>The network protocol this peer is connected through: IPv4, IPv6, Onion, I2P, or CJDNS.</string>
@@ -1094,7 +1120,7 @@
</property>
</widget>
</item>
- <item row="2" column="1">
+ <item row="3" column="1">
<widget class="QLabel" name="peerNetwork">
<property name="cursor">
<cursorShape>IBeamCursor</cursorShape>
@@ -1110,14 +1136,14 @@
</property>
</widget>
</item>
- <item row="3" column="0">
+ <item row="4" column="0">
<widget class="QLabel" name="label_21">
<property name="text">
<string>Version</string>
</property>
</widget>
</item>
- <item row="3" column="1">
+ <item row="4" column="1">
<widget class="QLabel" name="peerVersion">
<property name="cursor">
<cursorShape>IBeamCursor</cursorShape>
@@ -1133,14 +1159,14 @@
</property>
</widget>
</item>
- <item row="4" column="0">
+ <item row="5" column="0">
<widget class="QLabel" name="label_28">
<property name="text">
<string>User Agent</string>
</property>
</widget>
</item>
- <item row="4" column="1">
+ <item row="5" column="1">
<widget class="QLabel" name="peerSubversion">
<property name="cursor">
<cursorShape>IBeamCursor</cursorShape>
@@ -1156,14 +1182,14 @@
</property>
</widget>
</item>
- <item row="5" column="0">
+ <item row="6" column="0">
<widget class="QLabel" name="label_4">
<property name="text">
<string>Services</string>
</property>
</widget>
</item>
- <item row="5" column="1">
+ <item row="6" column="1">
<widget class="QLabel" name="peerServices">
<property name="cursor">
<cursorShape>IBeamCursor</cursorShape>
@@ -1182,7 +1208,7 @@
</property>
</widget>
</item>
- <item row="6" column="0">
+ <item row="7" column="0">
<widget class="QLabel" name="peerRelayTxesLabel">
<property name="toolTip">
<string>Whether we relay transactions to this peer.</string>
@@ -1192,7 +1218,7 @@
</property>
</widget>
</item>
- <item row="6" column="1">
+ <item row="7" column="1">
<widget class="QLabel" name="peerRelayTxes">
<property name="cursor">
<cursorShape>IBeamCursor</cursorShape>
@@ -1208,7 +1234,7 @@
</property>
</widget>
</item>
- <item row="7" column="0">
+ <item row="8" column="0">
<widget class="QLabel" name="peerHighBandwidthLabel">
<property name="toolTip">
<string>High bandwidth BIP152 compact block relay: %1</string>
@@ -1218,7 +1244,7 @@
</property>
</widget>
</item>
- <item row="7" column="1">
+ <item row="8" column="1">
<widget class="QLabel" name="peerHighBandwidth">
<property name="cursor">
<cursorShape>IBeamCursor</cursorShape>
@@ -1234,14 +1260,14 @@
</property>
</widget>
</item>
- <item row="8" column="0">
+ <item row="9" column="0">
<widget class="QLabel" name="label_29">
<property name="text">
<string>Starting Block</string>
</property>
</widget>
</item>
- <item row="8" column="1">
+ <item row="9" column="1">
<widget class="QLabel" name="peerHeight">
<property name="cursor">
<cursorShape>IBeamCursor</cursorShape>
@@ -1257,14 +1283,14 @@
</property>
</widget>
</item>
- <item row="9" column="0">
+ <item row="10" column="0">
<widget class="QLabel" name="label_27">
<property name="text">
<string>Synced Headers</string>
</property>
</widget>
</item>
- <item row="9" column="1">
+ <item row="10" column="1">
<widget class="QLabel" name="peerSyncHeight">
<property name="cursor">
<cursorShape>IBeamCursor</cursorShape>
@@ -1280,14 +1306,14 @@
</property>
</widget>
</item>
- <item row="10" column="0">
+ <item row="11" column="0">
<widget class="QLabel" name="label_25">
<property name="text">
<string>Synced Blocks</string>
</property>
</widget>
</item>
- <item row="10" column="1">
+ <item row="11" column="1">
<widget class="QLabel" name="peerCommonHeight">
<property name="cursor">
<cursorShape>IBeamCursor</cursorShape>
@@ -1303,14 +1329,14 @@
</property>
</widget>
</item>
- <item row="11" column="0">
+ <item row="12" column="0">
<widget class="QLabel" name="label_22">
<property name="text">
<string>Connection Time</string>
</property>
</widget>
</item>
- <item row="11" column="1">
+ <item row="12" column="1">
<widget class="QLabel" name="peerConnTime">
<property name="cursor">
<cursorShape>IBeamCursor</cursorShape>
@@ -1326,7 +1352,7 @@
</property>
</widget>
</item>
- <item row="12" column="0">
+ <item row="13" column="0">
<widget class="QLabel" name="peerLastBlockLabel">
<property name="toolTip">
<string>Elapsed time since a novel block passing initial validity checks was received from this peer.</string>
@@ -1336,7 +1362,7 @@
</property>
</widget>
</item>
- <item row="12" column="1">
+ <item row="13" column="1">
<widget class="QLabel" name="peerLastBlock">
<property name="cursor">
<cursorShape>IBeamCursor</cursorShape>
@@ -1352,7 +1378,7 @@
</property>
</widget>
</item>
- <item row="13" column="0">
+ <item row="14" column="0">
<widget class="QLabel" name="peerLastTxLabel">
<property name="toolTip">
<string extracomment="Tooltip text for the Last Transaction field in the peer details area.">Elapsed time since a novel transaction accepted into our mempool was received from this peer.</string>
@@ -1362,7 +1388,7 @@
</property>
</widget>
</item>
- <item row="13" column="1">
+ <item row="14" column="1">
<widget class="QLabel" name="peerLastTx">
<property name="cursor">
<cursorShape>IBeamCursor</cursorShape>
@@ -1378,14 +1404,14 @@
</property>
</widget>
</item>
- <item row="14" column="0">
+ <item row="15" column="0">
<widget class="QLabel" name="label_15">
<property name="text">
<string>Last Send</string>
</property>
</widget>
</item>
- <item row="14" column="1">
+ <item row="15" column="1">
<widget class="QLabel" name="peerLastSend">
<property name="cursor">
<cursorShape>IBeamCursor</cursorShape>
@@ -1401,14 +1427,14 @@
</property>
</widget>
</item>
- <item row="15" column="0">
+ <item row="16" column="0">
<widget class="QLabel" name="label_19">
<property name="text">
<string>Last Receive</string>
</property>
</widget>
</item>
- <item row="15" column="1">
+ <item row="16" column="1">
<widget class="QLabel" name="peerLastRecv">
<property name="cursor">
<cursorShape>IBeamCursor</cursorShape>
@@ -1424,14 +1450,14 @@
</property>
</widget>
</item>
- <item row="16" column="0">
+ <item row="17" column="0">
<widget class="QLabel" name="label_18">
<property name="text">
<string>Sent</string>
</property>
</widget>
</item>
- <item row="16" column="1">
+ <item row="17" column="1">
<widget class="QLabel" name="peerBytesSent">
<property name="cursor">
<cursorShape>IBeamCursor</cursorShape>
@@ -1447,14 +1473,14 @@
</property>
</widget>
</item>
- <item row="17" column="0">
+ <item row="18" column="0">
<widget class="QLabel" name="label_20">
<property name="text">
<string>Received</string>
</property>
</widget>
</item>
- <item row="17" column="1">
+ <item row="18" column="1">
<widget class="QLabel" name="peerBytesRecv">
<property name="cursor">
<cursorShape>IBeamCursor</cursorShape>
@@ -1470,14 +1496,14 @@
</property>
</widget>
</item>
- <item row="18" column="0">
+ <item row="19" column="0">
<widget class="QLabel" name="label_26">
<property name="text">
<string>Ping Time</string>
</property>
</widget>
</item>
- <item row="18" column="1">
+ <item row="19" column="1">
<widget class="QLabel" name="peerPingTime">
<property name="cursor">
<cursorShape>IBeamCursor</cursorShape>
@@ -1493,7 +1519,7 @@
</property>
</widget>
</item>
- <item row="19" column="0">
+ <item row="20" column="0">
<widget class="QLabel" name="peerPingWaitLabel">
<property name="toolTip">
<string>The duration of a currently outstanding ping.</string>
@@ -1503,7 +1529,7 @@
</property>
</widget>
</item>
- <item row="19" column="1">
+ <item row="20" column="1">
<widget class="QLabel" name="peerPingWait">
<property name="cursor">
<cursorShape>IBeamCursor</cursorShape>
@@ -1519,14 +1545,14 @@
</property>
</widget>
</item>
- <item row="20" column="0">
+ <item row="21" column="0">
<widget class="QLabel" name="peerMinPingLabel">
<property name="text">
<string>Min Ping</string>
</property>
</widget>
</item>
- <item row="20" column="1">
+ <item row="21" column="1">
<widget class="QLabel" name="peerMinPing">
<property name="cursor">
<cursorShape>IBeamCursor</cursorShape>
@@ -1542,14 +1568,14 @@
</property>
</widget>
</item>
- <item row="21" column="0">
+ <item row="22" column="0">
<widget class="QLabel" name="label_timeoffset">
<property name="text">
<string>Time Offset</string>
</property>
</widget>
</item>
- <item row="21" column="1">
+ <item row="22" column="1">
<widget class="QLabel" name="timeoffset">
<property name="cursor">
<cursorShape>IBeamCursor</cursorShape>
@@ -1565,7 +1591,7 @@
</property>
</widget>
</item>
- <item row="22" column="0">
+ <item row="23" column="0">
<widget class="QLabel" name="peerMappedASLabel">
<property name="toolTip">
<string>The mapped Autonomous System used for diversifying peer selection.</string>
@@ -1575,7 +1601,7 @@
</property>
</widget>
</item>
- <item row="22" column="1">
+ <item row="23" column="1">
<widget class="QLabel" name="peerMappedAS">
<property name="cursor">
<cursorShape>IBeamCursor</cursorShape>
@@ -1591,7 +1617,7 @@
</property>
</widget>
</item>
- <item row="23" column="0">
+ <item row="24" column="0">
<widget class="QLabel" name="peerAddrRelayEnabledLabel">
<property name="toolTip">
<string extracomment="Tooltip text for the Address Relay field in the peer details area, which displays whether we relay addresses to this peer (Yes/No).">Whether we relay addresses to this peer.</string>
@@ -1601,7 +1627,7 @@
</property>
</widget>
</item>
- <item row="23" column="1">
+ <item row="24" column="1">
<widget class="QLabel" name="peerAddrRelayEnabled">
<property name="cursor">
<cursorShape>IBeamCursor</cursorShape>
@@ -1617,7 +1643,7 @@
</property>
</widget>
</item>
- <item row="24" column="0">
+ <item row="25" column="0">
<widget class="QLabel" name="peerAddrProcessedLabel">
<property name="toolTip">
<string extracomment="Tooltip text for the Addresses Processed field in the peer details area, which displays the total number of addresses received from this peer that were processed (excludes addresses that were dropped due to rate-limiting).">The total number of addresses received from this peer that were processed (excludes addresses that were dropped due to rate-limiting).</string>
@@ -1627,7 +1653,7 @@
</property>
</widget>
</item>
- <item row="24" column="1">
+ <item row="25" column="1">
<widget class="QLabel" name="peerAddrProcessed">
<property name="cursor">
<cursorShape>IBeamCursor</cursorShape>
@@ -1643,7 +1669,7 @@
</property>
</widget>
</item>
- <item row="25" column="0">
+ <item row="26" column="0">
<widget class="QLabel" name="peerAddrRateLimitedLabel">
<property name="toolTip">
<string extracomment="Tooltip text for the Addresses Rate-Limited field in the peer details area, which displays the total number of addresses received from this peer that were dropped (not processed) due to rate-limiting.">The total number of addresses received from this peer that were dropped (not processed) due to rate-limiting.</string>
@@ -1653,7 +1679,7 @@
</property>
</widget>
</item>
- <item row="25" column="1">
+ <item row="26" column="1">
<widget class="QLabel" name="peerAddrRateLimited">
<property name="cursor">
<cursorShape>IBeamCursor</cursorShape>
@@ -1669,7 +1695,7 @@
</property>
</widget>
</item>
- <item row="26" column="0">
+ <item row="27" column="0">
<spacer name="verticalSpacer_3">
<property name="orientation">
<enum>Qt::Vertical</enum>
diff --git a/src/qt/rpcconsole.cpp b/src/qt/rpcconsole.cpp
index cb4ecfb6fb..27d460f8e1 100644
--- a/src/qt/rpcconsole.cpp
+++ b/src/qt/rpcconsole.cpp
@@ -12,6 +12,7 @@
#include <chainparams.h>
#include <common/system.h>
#include <interfaces/node.h>
+#include <node/connection_types.h>
#include <qt/bantablemodel.h>
#include <qt/clientmodel.h>
#include <qt/guiutil.h>
@@ -514,8 +515,17 @@ RPCConsole::RPCConsole(interfaces::Node& node, const PlatformStyle *_platformSty
/*: Explanatory text for a short-lived outbound peer connection that is used
to request addresses from a peer. */
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 connection_types_list{"<ul><li>" + Join(CONNECTION_TYPE_DOC, QString("</li><li>")) + "</li></ul>"};
+ ui->peerConnectionTypeLabel->setToolTip(ui->peerConnectionTypeLabel->toolTip().arg(connection_types_list));
+ const std::vector<QString> TRANSPORT_TYPE_DOC{
+ //: Explanatory text for "detecting" transport type.
+ tr("detecting: peer could be v1 or v2"),
+ //: Explanatory text for v1 transport type.
+ tr("v1: unencrypted, plaintext transport protocol"),
+ //: Explanatory text for v2 transport type.
+ tr("v2: BIP324 encrypted transport protocol")};
+ const QString transport_types_list{"<ul><li>" + Join(TRANSPORT_TYPE_DOC, QString("</li><li>")) + "</li></ul>"};
+ ui->peerTransportTypeLabel->setToolTip(ui->peerTransportTypeLabel->toolTip().arg(transport_types_list));
const QString hb_list{"<ul><li>\""
+ ts.to + "\" – " + tr("we selected the peer for high bandwidth relay") + "</li><li>\""
+ ts.from + "\" – " + tr("the peer selected us for high bandwidth relay") + "</li><li>\""
@@ -1191,6 +1201,7 @@ void RPCConsole::updateDetailWidget()
ui->peerSubversion->setText(QString::fromStdString(stats->nodeStats.cleanSubVer));
}
ui->peerConnectionType->setText(GUIUtil::ConnectionTypeToQString(stats->nodeStats.m_conn_type, /*prepend_direction=*/true));
+ ui->peerTransportType->setText(QString::fromStdString(TransportTypeAsString(stats->nodeStats.m_transport_type)));
ui->peerNetwork->setText(GUIUtil::NetworkToQString(stats->nodeStats.m_network));
if (stats->nodeStats.m_permission_flags == NetPermissionFlags::None) {
ui->peerPermissions->setText(ts.na);