|
18 | 18 | #include <chainparams.h> |
19 | 19 | #include <interfaces/node.h> |
20 | 20 | #include <netbase.h> |
21 | | -#include <rpc/server.h> |
22 | 21 | #include <rpc/client.h> |
| 22 | +#include <rpc/server.h> |
23 | 23 | #include <util/strencodings.h> |
| 24 | +#include <util/string.h> |
24 | 25 | #include <util/system.h> |
25 | 26 | #include <util/threadnames.h> |
26 | 27 | #include <util/underlying.h> |
@@ -476,11 +477,22 @@ RPCConsole::RPCConsole(interfaces::Node& node, QWidget* parent, Qt::WindowFlags |
476 | 477 |
|
477 | 478 | ui->splitter->restoreState(settings.value("PeersTabSplitterSizes").toByteArray()); |
478 | 479 |
|
479 | | - QChar nonbreaking_hyphen(8209); |
| 480 | + constexpr QChar nonbreaking_hyphen(8209); |
| 481 | + const std::vector<QString> CONNECTION_TYPE_DOC{ |
| 482 | + tr("Inbound Full/Block Relay: initiated by peer"), |
| 483 | + tr("Outbound Full Relay: default"), |
| 484 | + tr("Outbound Block Relay: does not relay transactions or addresses"), |
| 485 | + tr("Outbound Manual: added using RPC %1 or %2/%3 configuration options") |
| 486 | + .arg("addnode") |
| 487 | + .arg(QString(nonbreaking_hyphen) + "addnode") |
| 488 | + .arg(QString(nonbreaking_hyphen) + "connect"), |
| 489 | + tr("Outbound Feeler: short-lived, for testing addresses"), |
| 490 | + tr("Outbound Address Fetch: short-lived, for soliciting addresses")}; |
| 491 | + const QString list{"<ul><li>" + Join(CONNECTION_TYPE_DOC, QString("</li><li>")) + "</li></ul>"}; |
| 492 | + ui->peerConnectionTypeLabel->setToolTip(ui->peerConnectionTypeLabel->toolTip().arg(list)); |
480 | 493 | ui->dataDir->setToolTip(ui->dataDir->toolTip().arg(QString(nonbreaking_hyphen) + "datadir")); |
481 | 494 | ui->blocksDir->setToolTip(ui->blocksDir->toolTip().arg(QString(nonbreaking_hyphen) + "blocksdir")); |
482 | 495 | ui->openDebugLogfileButton->setToolTip(ui->openDebugLogfileButton->toolTip().arg(PACKAGE_NAME)); |
483 | | - ui->peerConnectionTypeLabel->setToolTip(ui->peerConnectionTypeLabel->toolTip().arg("addnode").arg(QString(nonbreaking_hyphen) + "addnode").arg(QString(nonbreaking_hyphen) + "connect")); |
484 | 496 |
|
485 | 497 | setButtonIcons(); |
486 | 498 |
|
@@ -1241,7 +1253,7 @@ void RPCConsole::updateDetailWidget() |
1241 | 1253 | ui->timeoffset->setText(GUIUtil::formatTimeOffset(stats->nodeStats.nTimeOffset)); |
1242 | 1254 | ui->peerVersion->setText(QString::number(stats->nodeStats.nVersion)); |
1243 | 1255 | ui->peerSubversion->setText(QString::fromStdString(stats->nodeStats.cleanSubVer)); |
1244 | | - ui->peerConnectionType->setText(GUIUtil::ConnectionTypeToQString(stats->nodeStats.m_conn_type)); |
| 1256 | + ui->peerConnectionType->setText(GUIUtil::ConnectionTypeToQString(stats->nodeStats.m_conn_type, stats->nodeStats.fRelayTxes)); |
1245 | 1257 | ui->peerNetwork->setText(GUIUtil::NetworkToQString(stats->nodeStats.m_network)); |
1246 | 1258 | if (stats->nodeStats.m_permissionFlags == NetPermissionFlags::None) { |
1247 | 1259 | ui->peerPermissions->setText(tr("N/A")); |
|
0 commit comments