aboutsummaryrefslogtreecommitdiff
path: root/src/qt
diff options
context:
space:
mode:
authorHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2023-10-03 10:19:09 +0100
committerHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2023-10-04 12:07:21 +0100
commitd9c4e344d70bbf31ccb7162d83d4bd25762bc678 (patch)
tree4d64ccfe812d97b1efc98389b857e08f0f83a564 /src/qt
parentf08adec886febbfe038cedc32970c27c6f72bd5f (diff)
downloadbitcoin-d9c4e344d70bbf31ccb7162d83d4bd25762bc678.tar.xz
qt: Add "Session id" label to peer details
Diffstat (limited to 'src/qt')
-rw-r--r--src/qt/forms/debugwindow.ui122
-rw-r--r--src/qt/rpcconsole.cpp8
2 files changed, 82 insertions, 48 deletions
diff --git a/src/qt/forms/debugwindow.ui b/src/qt/forms/debugwindow.ui
index 5cdba64378..60e9bcde33 100644
--- a/src/qt/forms/debugwindow.ui
+++ b/src/qt/forms/debugwindow.ui
@@ -1111,6 +1111,32 @@
</widget>
</item>
<item row="3" column="0">
+ <widget class="QLabel" name="peerSessionIdLabel">
+ <property name="toolTip">
+ <string>The BIP324 session ID string in hex, if any.</string>
+ </property>
+ <property name="text">
+ <string>Session ID</string>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="1">
+ <widget class="QLabel" name="peerSessionId">
+ <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="4" 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>
@@ -1120,7 +1146,7 @@
</property>
</widget>
</item>
- <item row="3" column="1">
+ <item row="4" column="1">
<widget class="QLabel" name="peerNetwork">
<property name="cursor">
<cursorShape>IBeamCursor</cursorShape>
@@ -1136,14 +1162,14 @@
</property>
</widget>
</item>
- <item row="4" column="0">
+ <item row="5" column="0">
<widget class="QLabel" name="label_21">
<property name="text">
<string>Version</string>
</property>
</widget>
</item>
- <item row="4" column="1">
+ <item row="5" column="1">
<widget class="QLabel" name="peerVersion">
<property name="cursor">
<cursorShape>IBeamCursor</cursorShape>
@@ -1159,14 +1185,14 @@
</property>
</widget>
</item>
- <item row="5" column="0">
+ <item row="6" column="0">
<widget class="QLabel" name="label_28">
<property name="text">
<string>User Agent</string>
</property>
</widget>
</item>
- <item row="5" column="1">
+ <item row="6" column="1">
<widget class="QLabel" name="peerSubversion">
<property name="cursor">
<cursorShape>IBeamCursor</cursorShape>
@@ -1182,14 +1208,14 @@
</property>
</widget>
</item>
- <item row="6" column="0">
+ <item row="7" column="0">
<widget class="QLabel" name="label_4">
<property name="text">
<string>Services</string>
</property>
</widget>
</item>
- <item row="6" column="1">
+ <item row="7" column="1">
<widget class="QLabel" name="peerServices">
<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="peerRelayTxesLabel">
<property name="toolTip">
<string>Whether we relay transactions to this peer.</string>
@@ -1218,7 +1244,7 @@
</property>
</widget>
</item>
- <item row="7" column="1">
+ <item row="8" column="1">
<widget class="QLabel" name="peerRelayTxes">
<property name="cursor">
<cursorShape>IBeamCursor</cursorShape>
@@ -1234,7 +1260,7 @@
</property>
</widget>
</item>
- <item row="8" column="0">
+ <item row="9" column="0">
<widget class="QLabel" name="peerHighBandwidthLabel">
<property name="toolTip">
<string>High bandwidth BIP152 compact block relay: %1</string>
@@ -1244,7 +1270,7 @@
</property>
</widget>
</item>
- <item row="8" column="1">
+ <item row="9" column="1">
<widget class="QLabel" name="peerHighBandwidth">
<property name="cursor">
<cursorShape>IBeamCursor</cursorShape>
@@ -1260,14 +1286,14 @@
</property>
</widget>
</item>
- <item row="9" column="0">
+ <item row="10" column="0">
<widget class="QLabel" name="label_29">
<property name="text">
<string>Starting Block</string>
</property>
</widget>
</item>
- <item row="9" column="1">
+ <item row="10" column="1">
<widget class="QLabel" name="peerHeight">
<property name="cursor">
<cursorShape>IBeamCursor</cursorShape>
@@ -1283,14 +1309,14 @@
</property>
</widget>
</item>
- <item row="10" column="0">
+ <item row="11" column="0">
<widget class="QLabel" name="label_27">
<property name="text">
<string>Synced Headers</string>
</property>
</widget>
</item>
- <item row="10" column="1">
+ <item row="11" column="1">
<widget class="QLabel" name="peerSyncHeight">
<property name="cursor">
<cursorShape>IBeamCursor</cursorShape>
@@ -1306,14 +1332,14 @@
</property>
</widget>
</item>
- <item row="11" column="0">
+ <item row="12" column="0">
<widget class="QLabel" name="label_25">
<property name="text">
<string>Synced Blocks</string>
</property>
</widget>
</item>
- <item row="11" column="1">
+ <item row="12" column="1">
<widget class="QLabel" name="peerCommonHeight">
<property name="cursor">
<cursorShape>IBeamCursor</cursorShape>
@@ -1329,14 +1355,14 @@
</property>
</widget>
</item>
- <item row="12" column="0">
+ <item row="13" column="0">
<widget class="QLabel" name="label_22">
<property name="text">
<string>Connection Time</string>
</property>
</widget>
</item>
- <item row="12" column="1">
+ <item row="13" column="1">
<widget class="QLabel" name="peerConnTime">
<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="peerLastBlockLabel">
<property name="toolTip">
<string>Elapsed time since a novel block passing initial validity checks 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="peerLastBlock">
<property name="cursor">
<cursorShape>IBeamCursor</cursorShape>
@@ -1378,7 +1404,7 @@
</property>
</widget>
</item>
- <item row="14" column="0">
+ <item row="15" 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>
@@ -1388,7 +1414,7 @@
</property>
</widget>
</item>
- <item row="14" column="1">
+ <item row="15" column="1">
<widget class="QLabel" name="peerLastTx">
<property name="cursor">
<cursorShape>IBeamCursor</cursorShape>
@@ -1404,14 +1430,14 @@
</property>
</widget>
</item>
- <item row="15" column="0">
+ <item row="16" column="0">
<widget class="QLabel" name="label_15">
<property name="text">
<string>Last Send</string>
</property>
</widget>
</item>
- <item row="15" column="1">
+ <item row="16" column="1">
<widget class="QLabel" name="peerLastSend">
<property name="cursor">
<cursorShape>IBeamCursor</cursorShape>
@@ -1427,14 +1453,14 @@
</property>
</widget>
</item>
- <item row="16" column="0">
+ <item row="17" column="0">
<widget class="QLabel" name="label_19">
<property name="text">
<string>Last Receive</string>
</property>
</widget>
</item>
- <item row="16" column="1">
+ <item row="17" column="1">
<widget class="QLabel" name="peerLastRecv">
<property name="cursor">
<cursorShape>IBeamCursor</cursorShape>
@@ -1450,14 +1476,14 @@
</property>
</widget>
</item>
- <item row="17" column="0">
+ <item row="18" column="0">
<widget class="QLabel" name="label_18">
<property name="text">
<string>Sent</string>
</property>
</widget>
</item>
- <item row="17" column="1">
+ <item row="18" column="1">
<widget class="QLabel" name="peerBytesSent">
<property name="cursor">
<cursorShape>IBeamCursor</cursorShape>
@@ -1473,14 +1499,14 @@
</property>
</widget>
</item>
- <item row="18" column="0">
+ <item row="19" column="0">
<widget class="QLabel" name="label_20">
<property name="text">
<string>Received</string>
</property>
</widget>
</item>
- <item row="18" column="1">
+ <item row="19" column="1">
<widget class="QLabel" name="peerBytesRecv">
<property name="cursor">
<cursorShape>IBeamCursor</cursorShape>
@@ -1496,14 +1522,14 @@
</property>
</widget>
</item>
- <item row="19" column="0">
+ <item row="20" column="0">
<widget class="QLabel" name="label_26">
<property name="text">
<string>Ping Time</string>
</property>
</widget>
</item>
- <item row="19" column="1">
+ <item row="20" column="1">
<widget class="QLabel" name="peerPingTime">
<property name="cursor">
<cursorShape>IBeamCursor</cursorShape>
@@ -1519,7 +1545,7 @@
</property>
</widget>
</item>
- <item row="20" column="0">
+ <item row="21" column="0">
<widget class="QLabel" name="peerPingWaitLabel">
<property name="toolTip">
<string>The duration of a currently outstanding ping.</string>
@@ -1529,7 +1555,7 @@
</property>
</widget>
</item>
- <item row="20" column="1">
+ <item row="21" column="1">
<widget class="QLabel" name="peerPingWait">
<property name="cursor">
<cursorShape>IBeamCursor</cursorShape>
@@ -1545,14 +1571,14 @@
</property>
</widget>
</item>
- <item row="21" column="0">
+ <item row="22" column="0">
<widget class="QLabel" name="peerMinPingLabel">
<property name="text">
<string>Min Ping</string>
</property>
</widget>
</item>
- <item row="21" column="1">
+ <item row="22" column="1">
<widget class="QLabel" name="peerMinPing">
<property name="cursor">
<cursorShape>IBeamCursor</cursorShape>
@@ -1568,14 +1594,14 @@
</property>
</widget>
</item>
- <item row="22" column="0">
+ <item row="23" column="0">
<widget class="QLabel" name="label_timeoffset">
<property name="text">
<string>Time Offset</string>
</property>
</widget>
</item>
- <item row="22" column="1">
+ <item row="23" column="1">
<widget class="QLabel" name="timeoffset">
<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="peerMappedASLabel">
<property name="toolTip">
<string>The mapped Autonomous System used for diversifying peer selection.</string>
@@ -1601,7 +1627,7 @@
</property>
</widget>
</item>
- <item row="23" column="1">
+ <item row="24" column="1">
<widget class="QLabel" name="peerMappedAS">
<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="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>
@@ -1627,7 +1653,7 @@
</property>
</widget>
</item>
- <item row="24" column="1">
+ <item row="25" column="1">
<widget class="QLabel" name="peerAddrRelayEnabled">
<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="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>
@@ -1653,7 +1679,7 @@
</property>
</widget>
</item>
- <item row="25" column="1">
+ <item row="26" column="1">
<widget class="QLabel" name="peerAddrProcessed">
<property name="cursor">
<cursorShape>IBeamCursor</cursorShape>
@@ -1669,7 +1695,7 @@
</property>
</widget>
</item>
- <item row="26" column="0">
+ <item row="27" 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>
@@ -1679,7 +1705,7 @@
</property>
</widget>
</item>
- <item row="26" column="1">
+ <item row="27" column="1">
<widget class="QLabel" name="peerAddrRateLimited">
<property name="cursor">
<cursorShape>IBeamCursor</cursorShape>
@@ -1695,7 +1721,7 @@
</property>
</widget>
</item>
- <item row="27" column="0">
+ <item row="28" 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 27d460f8e1..998a4e5cbe 100644
--- a/src/qt/rpcconsole.cpp
+++ b/src/qt/rpcconsole.cpp
@@ -1202,6 +1202,14 @@ void RPCConsole::updateDetailWidget()
}
ui->peerConnectionType->setText(GUIUtil::ConnectionTypeToQString(stats->nodeStats.m_conn_type, /*prepend_direction=*/true));
ui->peerTransportType->setText(QString::fromStdString(TransportTypeAsString(stats->nodeStats.m_transport_type)));
+ if (stats->nodeStats.m_transport_type == TransportProtocolType::V2) {
+ ui->peerSessionIdLabel->setVisible(true);
+ ui->peerSessionId->setVisible(true);
+ ui->peerSessionId->setText(QString::fromStdString(stats->nodeStats.m_session_id));
+ } else {
+ ui->peerSessionIdLabel->setVisible(false);
+ ui->peerSessionId->setVisible(false);
+ }
ui->peerNetwork->setText(GUIUtil::NetworkToQString(stats->nodeStats.m_network));
if (stats->nodeStats.m_permission_flags == NetPermissionFlags::None) {
ui->peerPermissions->setText(ts.na);