qt: Add "Session id" label to peer details

pull/28532/head
Hennadii Stepanov 1 year ago
parent f08adec886
commit d9c4e344d7
No known key found for this signature in database
GPG Key ID: 410108112E7EA81F

@ -1111,6 +1111,32 @@
</widget> </widget>
</item> </item>
<item row="3" column="0"> <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"> <widget class="QLabel" name="peerNetworkLabel">
<property name="toolTip"> <property name="toolTip">
<string>The network protocol this peer is connected through: IPv4, IPv6, Onion, I2P, or CJDNS.</string> <string>The network protocol this peer is connected through: IPv4, IPv6, Onion, I2P, or CJDNS.</string>
@ -1120,7 +1146,7 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="3" column="1"> <item row="4" column="1">
<widget class="QLabel" name="peerNetwork"> <widget class="QLabel" name="peerNetwork">
<property name="cursor"> <property name="cursor">
<cursorShape>IBeamCursor</cursorShape> <cursorShape>IBeamCursor</cursorShape>
@ -1136,14 +1162,14 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="4" column="0"> <item row="5" column="0">
<widget class="QLabel" name="label_21"> <widget class="QLabel" name="label_21">
<property name="text"> <property name="text">
<string>Version</string> <string>Version</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="4" column="1"> <item row="5" column="1">
<widget class="QLabel" name="peerVersion"> <widget class="QLabel" name="peerVersion">
<property name="cursor"> <property name="cursor">
<cursorShape>IBeamCursor</cursorShape> <cursorShape>IBeamCursor</cursorShape>
@ -1159,14 +1185,14 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="5" column="0"> <item row="6" column="0">
<widget class="QLabel" name="label_28"> <widget class="QLabel" name="label_28">
<property name="text"> <property name="text">
<string>User Agent</string> <string>User Agent</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="5" column="1"> <item row="6" column="1">
<widget class="QLabel" name="peerSubversion"> <widget class="QLabel" name="peerSubversion">
<property name="cursor"> <property name="cursor">
<cursorShape>IBeamCursor</cursorShape> <cursorShape>IBeamCursor</cursorShape>
@ -1182,14 +1208,14 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="6" column="0"> <item row="7" column="0">
<widget class="QLabel" name="label_4"> <widget class="QLabel" name="label_4">
<property name="text"> <property name="text">
<string>Services</string> <string>Services</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="6" column="1"> <item row="7" column="1">
<widget class="QLabel" name="peerServices"> <widget class="QLabel" name="peerServices">
<property name="cursor"> <property name="cursor">
<cursorShape>IBeamCursor</cursorShape> <cursorShape>IBeamCursor</cursorShape>
@ -1208,7 +1234,7 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="7" column="0"> <item row="8" column="0">
<widget class="QLabel" name="peerRelayTxesLabel"> <widget class="QLabel" name="peerRelayTxesLabel">
<property name="toolTip"> <property name="toolTip">
<string>Whether we relay transactions to this peer.</string> <string>Whether we relay transactions to this peer.</string>
@ -1218,7 +1244,7 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="7" column="1"> <item row="8" column="1">
<widget class="QLabel" name="peerRelayTxes"> <widget class="QLabel" name="peerRelayTxes">
<property name="cursor"> <property name="cursor">
<cursorShape>IBeamCursor</cursorShape> <cursorShape>IBeamCursor</cursorShape>
@ -1234,7 +1260,7 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="8" column="0"> <item row="9" column="0">
<widget class="QLabel" name="peerHighBandwidthLabel"> <widget class="QLabel" name="peerHighBandwidthLabel">
<property name="toolTip"> <property name="toolTip">
<string>High bandwidth BIP152 compact block relay: %1</string> <string>High bandwidth BIP152 compact block relay: %1</string>
@ -1244,7 +1270,7 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="8" column="1"> <item row="9" column="1">
<widget class="QLabel" name="peerHighBandwidth"> <widget class="QLabel" name="peerHighBandwidth">
<property name="cursor"> <property name="cursor">
<cursorShape>IBeamCursor</cursorShape> <cursorShape>IBeamCursor</cursorShape>
@ -1260,14 +1286,14 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="9" column="0"> <item row="10" column="0">
<widget class="QLabel" name="label_29"> <widget class="QLabel" name="label_29">
<property name="text"> <property name="text">
<string>Starting Block</string> <string>Starting Block</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="9" column="1"> <item row="10" column="1">
<widget class="QLabel" name="peerHeight"> <widget class="QLabel" name="peerHeight">
<property name="cursor"> <property name="cursor">
<cursorShape>IBeamCursor</cursorShape> <cursorShape>IBeamCursor</cursorShape>
@ -1283,14 +1309,14 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="10" column="0"> <item row="11" column="0">
<widget class="QLabel" name="label_27"> <widget class="QLabel" name="label_27">
<property name="text"> <property name="text">
<string>Synced Headers</string> <string>Synced Headers</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="10" column="1"> <item row="11" column="1">
<widget class="QLabel" name="peerSyncHeight"> <widget class="QLabel" name="peerSyncHeight">
<property name="cursor"> <property name="cursor">
<cursorShape>IBeamCursor</cursorShape> <cursorShape>IBeamCursor</cursorShape>
@ -1306,14 +1332,14 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="11" column="0"> <item row="12" column="0">
<widget class="QLabel" name="label_25"> <widget class="QLabel" name="label_25">
<property name="text"> <property name="text">
<string>Synced Blocks</string> <string>Synced Blocks</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="11" column="1"> <item row="12" column="1">
<widget class="QLabel" name="peerCommonHeight"> <widget class="QLabel" name="peerCommonHeight">
<property name="cursor"> <property name="cursor">
<cursorShape>IBeamCursor</cursorShape> <cursorShape>IBeamCursor</cursorShape>
@ -1329,14 +1355,14 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="12" column="0"> <item row="13" column="0">
<widget class="QLabel" name="label_22"> <widget class="QLabel" name="label_22">
<property name="text"> <property name="text">
<string>Connection Time</string> <string>Connection Time</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="12" column="1"> <item row="13" column="1">
<widget class="QLabel" name="peerConnTime"> <widget class="QLabel" name="peerConnTime">
<property name="cursor"> <property name="cursor">
<cursorShape>IBeamCursor</cursorShape> <cursorShape>IBeamCursor</cursorShape>
@ -1352,7 +1378,7 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="13" column="0"> <item row="14" column="0">
<widget class="QLabel" name="peerLastBlockLabel"> <widget class="QLabel" name="peerLastBlockLabel">
<property name="toolTip"> <property name="toolTip">
<string>Elapsed time since a novel block passing initial validity checks was received from this peer.</string> <string>Elapsed time since a novel block passing initial validity checks was received from this peer.</string>
@ -1362,7 +1388,7 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="13" column="1"> <item row="14" column="1">
<widget class="QLabel" name="peerLastBlock"> <widget class="QLabel" name="peerLastBlock">
<property name="cursor"> <property name="cursor">
<cursorShape>IBeamCursor</cursorShape> <cursorShape>IBeamCursor</cursorShape>
@ -1378,7 +1404,7 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="14" column="0"> <item row="15" column="0">
<widget class="QLabel" name="peerLastTxLabel"> <widget class="QLabel" name="peerLastTxLabel">
<property name="toolTip"> <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> <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> </property>
</widget> </widget>
</item> </item>
<item row="14" column="1"> <item row="15" column="1">
<widget class="QLabel" name="peerLastTx"> <widget class="QLabel" name="peerLastTx">
<property name="cursor"> <property name="cursor">
<cursorShape>IBeamCursor</cursorShape> <cursorShape>IBeamCursor</cursorShape>
@ -1404,14 +1430,14 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="15" column="0"> <item row="16" column="0">
<widget class="QLabel" name="label_15"> <widget class="QLabel" name="label_15">
<property name="text"> <property name="text">
<string>Last Send</string> <string>Last Send</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="15" column="1"> <item row="16" column="1">
<widget class="QLabel" name="peerLastSend"> <widget class="QLabel" name="peerLastSend">
<property name="cursor"> <property name="cursor">
<cursorShape>IBeamCursor</cursorShape> <cursorShape>IBeamCursor</cursorShape>
@ -1427,14 +1453,14 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="16" column="0"> <item row="17" column="0">
<widget class="QLabel" name="label_19"> <widget class="QLabel" name="label_19">
<property name="text"> <property name="text">
<string>Last Receive</string> <string>Last Receive</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="16" column="1"> <item row="17" column="1">
<widget class="QLabel" name="peerLastRecv"> <widget class="QLabel" name="peerLastRecv">
<property name="cursor"> <property name="cursor">
<cursorShape>IBeamCursor</cursorShape> <cursorShape>IBeamCursor</cursorShape>
@ -1450,14 +1476,14 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="17" column="0"> <item row="18" column="0">
<widget class="QLabel" name="label_18"> <widget class="QLabel" name="label_18">
<property name="text"> <property name="text">
<string>Sent</string> <string>Sent</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="17" column="1"> <item row="18" column="1">
<widget class="QLabel" name="peerBytesSent"> <widget class="QLabel" name="peerBytesSent">
<property name="cursor"> <property name="cursor">
<cursorShape>IBeamCursor</cursorShape> <cursorShape>IBeamCursor</cursorShape>
@ -1473,14 +1499,14 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="18" column="0"> <item row="19" column="0">
<widget class="QLabel" name="label_20"> <widget class="QLabel" name="label_20">
<property name="text"> <property name="text">
<string>Received</string> <string>Received</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="18" column="1"> <item row="19" column="1">
<widget class="QLabel" name="peerBytesRecv"> <widget class="QLabel" name="peerBytesRecv">
<property name="cursor"> <property name="cursor">
<cursorShape>IBeamCursor</cursorShape> <cursorShape>IBeamCursor</cursorShape>
@ -1496,14 +1522,14 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="19" column="0"> <item row="20" column="0">
<widget class="QLabel" name="label_26"> <widget class="QLabel" name="label_26">
<property name="text"> <property name="text">
<string>Ping Time</string> <string>Ping Time</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="19" column="1"> <item row="20" column="1">
<widget class="QLabel" name="peerPingTime"> <widget class="QLabel" name="peerPingTime">
<property name="cursor"> <property name="cursor">
<cursorShape>IBeamCursor</cursorShape> <cursorShape>IBeamCursor</cursorShape>
@ -1519,7 +1545,7 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="20" column="0"> <item row="21" column="0">
<widget class="QLabel" name="peerPingWaitLabel"> <widget class="QLabel" name="peerPingWaitLabel">
<property name="toolTip"> <property name="toolTip">
<string>The duration of a currently outstanding ping.</string> <string>The duration of a currently outstanding ping.</string>
@ -1529,7 +1555,7 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="20" column="1"> <item row="21" column="1">
<widget class="QLabel" name="peerPingWait"> <widget class="QLabel" name="peerPingWait">
<property name="cursor"> <property name="cursor">
<cursorShape>IBeamCursor</cursorShape> <cursorShape>IBeamCursor</cursorShape>
@ -1545,14 +1571,14 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="21" column="0"> <item row="22" column="0">
<widget class="QLabel" name="peerMinPingLabel"> <widget class="QLabel" name="peerMinPingLabel">
<property name="text"> <property name="text">
<string>Min Ping</string> <string>Min Ping</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="21" column="1"> <item row="22" column="1">
<widget class="QLabel" name="peerMinPing"> <widget class="QLabel" name="peerMinPing">
<property name="cursor"> <property name="cursor">
<cursorShape>IBeamCursor</cursorShape> <cursorShape>IBeamCursor</cursorShape>
@ -1568,14 +1594,14 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="22" column="0"> <item row="23" column="0">
<widget class="QLabel" name="label_timeoffset"> <widget class="QLabel" name="label_timeoffset">
<property name="text"> <property name="text">
<string>Time Offset</string> <string>Time Offset</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="22" column="1"> <item row="23" column="1">
<widget class="QLabel" name="timeoffset"> <widget class="QLabel" name="timeoffset">
<property name="cursor"> <property name="cursor">
<cursorShape>IBeamCursor</cursorShape> <cursorShape>IBeamCursor</cursorShape>
@ -1591,7 +1617,7 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="23" column="0"> <item row="24" column="0">
<widget class="QLabel" name="peerMappedASLabel"> <widget class="QLabel" name="peerMappedASLabel">
<property name="toolTip"> <property name="toolTip">
<string>The mapped Autonomous System used for diversifying peer selection.</string> <string>The mapped Autonomous System used for diversifying peer selection.</string>
@ -1601,7 +1627,7 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="23" column="1"> <item row="24" column="1">
<widget class="QLabel" name="peerMappedAS"> <widget class="QLabel" name="peerMappedAS">
<property name="cursor"> <property name="cursor">
<cursorShape>IBeamCursor</cursorShape> <cursorShape>IBeamCursor</cursorShape>
@ -1617,7 +1643,7 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="24" column="0"> <item row="25" column="0">
<widget class="QLabel" name="peerAddrRelayEnabledLabel"> <widget class="QLabel" name="peerAddrRelayEnabledLabel">
<property name="toolTip"> <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> <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> </property>
</widget> </widget>
</item> </item>
<item row="24" column="1"> <item row="25" column="1">
<widget class="QLabel" name="peerAddrRelayEnabled"> <widget class="QLabel" name="peerAddrRelayEnabled">
<property name="cursor"> <property name="cursor">
<cursorShape>IBeamCursor</cursorShape> <cursorShape>IBeamCursor</cursorShape>
@ -1643,7 +1669,7 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="25" column="0"> <item row="26" column="0">
<widget class="QLabel" name="peerAddrProcessedLabel"> <widget class="QLabel" name="peerAddrProcessedLabel">
<property name="toolTip"> <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> <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> </property>
</widget> </widget>
</item> </item>
<item row="25" column="1"> <item row="26" column="1">
<widget class="QLabel" name="peerAddrProcessed"> <widget class="QLabel" name="peerAddrProcessed">
<property name="cursor"> <property name="cursor">
<cursorShape>IBeamCursor</cursorShape> <cursorShape>IBeamCursor</cursorShape>
@ -1669,7 +1695,7 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="26" column="0"> <item row="27" column="0">
<widget class="QLabel" name="peerAddrRateLimitedLabel"> <widget class="QLabel" name="peerAddrRateLimitedLabel">
<property name="toolTip"> <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> <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> </property>
</widget> </widget>
</item> </item>
<item row="26" column="1"> <item row="27" column="1">
<widget class="QLabel" name="peerAddrRateLimited"> <widget class="QLabel" name="peerAddrRateLimited">
<property name="cursor"> <property name="cursor">
<cursorShape>IBeamCursor</cursorShape> <cursorShape>IBeamCursor</cursorShape>
@ -1695,7 +1721,7 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="27" column="0"> <item row="28" column="0">
<spacer name="verticalSpacer_3"> <spacer name="verticalSpacer_3">
<property name="orientation"> <property name="orientation">
<enum>Qt::Vertical</enum> <enum>Qt::Vertical</enum>

@ -1202,6 +1202,14 @@ void RPCConsole::updateDetailWidget()
} }
ui->peerConnectionType->setText(GUIUtil::ConnectionTypeToQString(stats->nodeStats.m_conn_type, /*prepend_direction=*/true)); 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->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)); ui->peerNetwork->setText(GUIUtil::NetworkToQString(stats->nodeStats.m_network));
if (stats->nodeStats.m_permission_flags == NetPermissionFlags::None) { if (stats->nodeStats.m_permission_flags == NetPermissionFlags::None) {
ui->peerPermissions->setText(ts.na); ui->peerPermissions->setText(ts.na);

Loading…
Cancel
Save