Skip to content

Commit aae2605

Browse files
committed
gui: display Mapped AS in peers info window
1 parent ac579ad commit aae2605

File tree

2 files changed

+29
-2
lines changed

2 files changed

+29
-2
lines changed

src/qt/forms/debugwindow.ui

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1503,6 +1503,32 @@
15031503
</widget>
15041504
</item>
15051505
<item row="18" column="0">
1506+
<widget class="QLabel" name="peerMappedASLabel">
1507+
<property name="toolTip">
1508+
<string>The mapped Autonomous System used for diversifying peer selection.</string>
1509+
</property>
1510+
<property name="text">
1511+
<string>Mapped AS</string>
1512+
</property>
1513+
</widget>
1514+
</item>
1515+
<item row="18" column="1">
1516+
<widget class="QLabel" name="peerMappedAS">
1517+
<property name="cursor">
1518+
<cursorShape>IBeamCursor</cursorShape>
1519+
</property>
1520+
<property name="text">
1521+
<string>N/A</string>
1522+
</property>
1523+
<property name="textFormat">
1524+
<enum>Qt::PlainText</enum>
1525+
</property>
1526+
<property name="textInteractionFlags">
1527+
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
1528+
</property>
1529+
</widget>
1530+
</item>
1531+
<item row="19" column="0">
15061532
<spacer name="verticalSpacer_3">
15071533
<property name="orientation">
15081534
<enum>Qt::Vertical</enum>

src/qt/rpcconsole.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1113,11 +1113,12 @@ void RPCConsole::updateNodeDetail(const CNodeCombinedStats *stats)
11131113
ui->peerPingWait->setText(GUIUtil::formatPingTime(stats->nodeStats.m_ping_wait_usec));
11141114
ui->peerMinPing->setText(GUIUtil::formatPingTime(stats->nodeStats.m_min_ping_usec));
11151115
ui->timeoffset->setText(GUIUtil::formatTimeOffset(stats->nodeStats.nTimeOffset));
1116-
ui->peerVersion->setText(QString("%1").arg(QString::number(stats->nodeStats.nVersion)));
1116+
ui->peerVersion->setText(QString::number(stats->nodeStats.nVersion));
11171117
ui->peerSubversion->setText(QString::fromStdString(stats->nodeStats.cleanSubVer));
11181118
ui->peerDirection->setText(stats->nodeStats.fInbound ? tr("Inbound") : tr("Outbound"));
1119-
ui->peerHeight->setText(QString("%1").arg(QString::number(stats->nodeStats.nStartingHeight)));
1119+
ui->peerHeight->setText(QString::number(stats->nodeStats.nStartingHeight));
11201120
ui->peerWhitelisted->setText(stats->nodeStats.m_legacyWhitelisted ? tr("Yes") : tr("No"));
1121+
ui->peerMappedAS->setText(stats->nodeStats.m_mapped_as != 0 ? QString::number(stats->nodeStats.m_mapped_as) : tr("N/A"));
11211122

11221123
// This check fails for example if the lock was busy and
11231124
// nodeStateStats couldn't be fetched.

0 commit comments

Comments
 (0)