diff --git a/src/qt/forms/debugwindow.ui b/src/qt/forms/debugwindow.ui index f1b66341d1..60e9bcde33 100644 --- a/src/qt/forms/debugwindow.ui +++ b/src/qt/forms/debugwindow.ui @@ -1085,17 +1085,17 @@ - + - The network protocol this peer is connected through: IPv4, IPv6, Onion, I2P, or CJDNS. + The transport layer version: %1 - Network + Transport - + IBeamCursor @@ -1111,14 +1111,17 @@ - + + + The BIP324 session ID string in hex, if any. + - Version + Session ID - + IBeamCursor @@ -1134,14 +1137,17 @@ - + + + The network protocol this peer is connected through: IPv4, IPv6, Onion, I2P, or CJDNS. + - User Agent + Network - + IBeamCursor @@ -1157,13 +1163,59 @@ + + + Version + + + + + + + IBeamCursor + + + N/A + + + Qt::PlainText + + + Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse + + + + + + + User Agent + + + + + + + IBeamCursor + + + N/A + + + Qt::PlainText + + + Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse + + + + Services - + IBeamCursor @@ -1182,7 +1234,7 @@ - + Whether we relay transactions to this peer. @@ -1192,7 +1244,7 @@ - + IBeamCursor @@ -1208,7 +1260,7 @@ - + High bandwidth BIP152 compact block relay: %1 @@ -1218,7 +1270,7 @@ - + IBeamCursor @@ -1234,14 +1286,14 @@ - + Starting Block - + IBeamCursor @@ -1257,14 +1309,14 @@ - + Synced Headers - + IBeamCursor @@ -1280,14 +1332,14 @@ - + Synced Blocks - + IBeamCursor @@ -1303,14 +1355,14 @@ - + Connection Time - + IBeamCursor @@ -1326,7 +1378,7 @@ - + Elapsed time since a novel block passing initial validity checks was received from this peer. @@ -1336,7 +1388,7 @@ - + IBeamCursor @@ -1352,7 +1404,7 @@ - + Elapsed time since a novel transaction accepted into our mempool was received from this peer. @@ -1362,7 +1414,7 @@ - + IBeamCursor @@ -1378,14 +1430,14 @@ - + Last Send - + IBeamCursor @@ -1401,14 +1453,14 @@ - + Last Receive - + IBeamCursor @@ -1424,14 +1476,14 @@ - + Sent - + IBeamCursor @@ -1447,14 +1499,14 @@ - + Received - + IBeamCursor @@ -1470,14 +1522,14 @@ - + Ping Time - + IBeamCursor @@ -1493,7 +1545,7 @@ - + The duration of a currently outstanding ping. @@ -1503,7 +1555,7 @@ - + IBeamCursor @@ -1519,14 +1571,14 @@ - + Min Ping - + IBeamCursor @@ -1542,14 +1594,14 @@ - + Time Offset - + IBeamCursor @@ -1565,7 +1617,7 @@ - + The mapped Autonomous System used for diversifying peer selection. @@ -1575,7 +1627,7 @@ - + IBeamCursor @@ -1591,7 +1643,7 @@ - + Whether we relay addresses to this peer. @@ -1601,7 +1653,7 @@ - + IBeamCursor @@ -1617,7 +1669,7 @@ - + The total number of addresses received from this peer that were processed (excludes addresses that were dropped due to rate-limiting). @@ -1627,7 +1679,7 @@ - + IBeamCursor @@ -1643,7 +1695,7 @@ - + The total number of addresses received from this peer that were dropped (not processed) due to rate-limiting. @@ -1653,7 +1705,7 @@ - + IBeamCursor @@ -1669,7 +1721,7 @@ - + Qt::Vertical diff --git a/src/qt/rpcconsole.cpp b/src/qt/rpcconsole.cpp index cb4ecfb6fb..998a4e5cbe 100644 --- a/src/qt/rpcconsole.cpp +++ b/src/qt/rpcconsole.cpp @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include @@ -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{"
  • " + Join(CONNECTION_TYPE_DOC, QString("
  • ")) + "
"}; - ui->peerConnectionTypeLabel->setToolTip(ui->peerConnectionTypeLabel->toolTip().arg(list)); + const QString connection_types_list{"
  • " + Join(CONNECTION_TYPE_DOC, QString("
  • ")) + "
"}; + ui->peerConnectionTypeLabel->setToolTip(ui->peerConnectionTypeLabel->toolTip().arg(connection_types_list)); + const std::vector 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{"
  • " + Join(TRANSPORT_TYPE_DOC, QString("
  • ")) + "
"}; + ui->peerTransportTypeLabel->setToolTip(ui->peerTransportTypeLabel->toolTip().arg(transport_types_list)); const QString hb_list{"
  • \"" + ts.to + "\" – " + tr("we selected the peer for high bandwidth relay") + "
  • \"" + ts.from + "\" – " + tr("the peer selected us for high bandwidth relay") + "
  • \"" @@ -1191,6 +1201,15 @@ 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))); + 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);