Skip to content

Commit 4f09615

Browse files
committed
gui: return inbound {full, block} relay type in peer details
1 parent 0944024 commit 4f09615

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

src/qt/forms/debugwindow.ui

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1079,7 +1079,7 @@
10791079
<item row="1" column="0">
10801080
<widget class="QLabel" name="peerConnectionTypeLabel">
10811081
<property name="toolTip">
1082-
<string>The type of peer connection:&lt;ul&gt;&lt;li&gt;Inbound: initiated by peer&lt;/li&gt;&lt;li&gt;Outbound Full Relay: default&lt;/li&gt;&lt;li&gt;Outbound Block Relay: does not relay transactions or addresses&lt;/li&gt;&lt;li&gt;Outbound Manual: added using RPC %1 or %2/%3 configuration options&lt;/li&gt;&lt;li&gt;Outbound Feeler: short-lived, for testing addresses&lt;/li&gt;&lt;li&gt;Outbound Address Fetch: short-lived, for soliciting addresses&lt;/li&gt;&lt;/ul&gt;</string>
1082+
<string>The type of peer connection:&lt;ul&gt;&lt;li&gt;Inbound Full/Block Relay: initiated by peer&lt;/li&gt;&lt;li&gt;Outbound Full Relay: default&lt;/li&gt;&lt;li&gt;Outbound Block Relay: does not relay transactions or addresses&lt;/li&gt;&lt;li&gt;Outbound Manual: added using RPC %1 or %2/%3 configuration options&lt;/li&gt;&lt;li&gt;Outbound Feeler: short-lived, for testing addresses&lt;/li&gt;&lt;li&gt;Outbound Address Fetch: short-lived, for soliciting addresses&lt;/li&gt;&lt;/ul&gt;</string>
10831083
</property>
10841084
<property name="text">
10851085
<string>Connection Type</string>

src/qt/guiutil.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -764,10 +764,10 @@ QString NetworkToQString(Network net)
764764
assert(false);
765765
}
766766

767-
QString ConnectionTypeToQString(ConnectionType conn_type)
767+
QString ConnectionTypeToQString(ConnectionType conn_type, bool relay_txes)
768768
{
769769
switch (conn_type) {
770-
case ConnectionType::INBOUND: return QObject::tr("Inbound");
770+
case ConnectionType::INBOUND: return relay_txes ? QObject::tr("Inbound Full Relay") : QObject::tr("Inbound Block Relay");
771771
case ConnectionType::OUTBOUND_FULL_RELAY: return QObject::tr("Outbound Full Relay");
772772
case ConnectionType::BLOCK_RELAY: return QObject::tr("Outbound Block Relay");
773773
case ConnectionType::MANUAL: return QObject::tr("Outbound Manual");

src/qt/guiutil.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ namespace GUIUtil
230230
QString NetworkToQString(Network net);
231231

232232
/** Convert enum ConnectionType to QString */
233-
QString ConnectionTypeToQString(ConnectionType conn_type);
233+
QString ConnectionTypeToQString(ConnectionType conn_type, bool relay_txes);
234234

235235
/** Convert seconds into a QString with days, hours, mins, secs */
236236
QString formatDurationStr(int secs);

src/qt/rpcconsole.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1112,7 +1112,7 @@ void RPCConsole::updateDetailWidget()
11121112
ui->timeoffset->setText(GUIUtil::formatTimeOffset(stats->nodeStats.nTimeOffset));
11131113
ui->peerVersion->setText(QString::number(stats->nodeStats.nVersion));
11141114
ui->peerSubversion->setText(QString::fromStdString(stats->nodeStats.cleanSubVer));
1115-
ui->peerConnectionType->setText(GUIUtil::ConnectionTypeToQString(stats->nodeStats.m_conn_type));
1115+
ui->peerConnectionType->setText(GUIUtil::ConnectionTypeToQString(stats->nodeStats.m_conn_type, stats->nodeStats.fRelayTxes));
11161116
ui->peerNetwork->setText(GUIUtil::NetworkToQString(stats->nodeStats.m_network));
11171117
if (stats->nodeStats.m_permissionFlags == PF_NONE) {
11181118
ui->peerPermissions->setText(tr("N/A"));

0 commit comments

Comments
 (0)