Skip to content

Commit df5fb7e

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

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

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 QObject::tr(relay_txes ? "Inbound Full Relay" : "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)