Skip to content

Commit 5b4b8f7

Browse files
committed
Merge bitcoin-core/gui#526: Add address relay/processed/rate-limited fields to peer details
9fbd1bb gui: use available space to display "Last Transaction" in peer details (Jon Atack) 6cd132d gui: add "Addresses Rate-Limited" (m_addr_rate_limited) to peer details (Jon Atack) 19623d3 gui: add "Addresses Processed" (m_addr_processed) to peer details (Jon Atack) a465a66 gui: add "Address Relay" (m_addr_relay_enabled) to peer details (Jon Atack) Pull request description: This pull adds the following address fields in rpc getpeerinfo and cli -netinfo to the gui peers details: - Address Relay (Yes/No) - Addresses Processed (integer) - Addresses Rate-Limited (integer) and uses the additional horizontal space to display "Last Transaction" (instead of "Last Tx"). ![Screenshot from 2022-01-21 00-05-49](https://user-images.githubusercontent.com/2415484/150436343-02abe635-8abe-4212-9ce5-522df17ca2b6.png) ACKs for top commit: hebasto: ACK 9fbd1bb, tested on Ubuntu 21.10 (Qt 5.15.2). w0xlt: reACK 9fbd1bb Tree-SHA512: 76d414b82f432b7baf2cadcf2f52412a3af8ad78a93755bb82c65df5353dda4d2e2522428a36c8bb95316bf84b17f2485636c33ce5ae11566469671b5384d845
2 parents 1245c62 + 9fbd1bb commit 5b4b8f7

File tree

2 files changed

+83
-2
lines changed

2 files changed

+83
-2
lines changed

src/qt/forms/debugwindow.ui

+80-2
Original file line numberDiff line numberDiff line change
@@ -1355,10 +1355,10 @@
13551355
<item row="13" column="0">
13561356
<widget class="QLabel" name="peerLastTxLabel">
13571357
<property name="toolTip">
1358-
<string>Elapsed time since a novel transaction accepted into our mempool was received from this peer.</string>
1358+
<string extracomment="Tooltip text for the Last Transaction field in the peer details area.">Elapsed time since a novel transaction accepted into our mempool was received from this peer.</string>
13591359
</property>
13601360
<property name="text">
1361-
<string>Last Tx</string>
1361+
<string>Last Transaction</string>
13621362
</property>
13631363
</widget>
13641364
</item>
@@ -1592,6 +1592,84 @@
15921592
</widget>
15931593
</item>
15941594
<item row="23" column="0">
1595+
<widget class="QLabel" name="peerAddrRelayEnabledLabel">
1596+
<property name="toolTip">
1597+
<string extracomment="Tooltip text for the Address Relay field in the peer details area.">Whether we relay addresses to this peer.</string>
1598+
</property>
1599+
<property name="text">
1600+
<string>Address Relay</string>
1601+
</property>
1602+
</widget>
1603+
</item>
1604+
<item row="23" column="1">
1605+
<widget class="QLabel" name="peerAddrRelayEnabled">
1606+
<property name="cursor">
1607+
<cursorShape>IBeamCursor</cursorShape>
1608+
</property>
1609+
<property name="text">
1610+
<string>N/A</string>
1611+
</property>
1612+
<property name="textFormat">
1613+
<enum>Qt::PlainText</enum>
1614+
</property>
1615+
<property name="textInteractionFlags">
1616+
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
1617+
</property>
1618+
</widget>
1619+
</item>
1620+
<item row="24" column="0">
1621+
<widget class="QLabel" name="peerAddrProcessedLabel">
1622+
<property name="toolTip">
1623+
<string extracomment="Tooltip text for the Addresses Processed field in the peer details area.">Total number of addresses processed, excluding those dropped due to rate-limiting.</string>
1624+
</property>
1625+
<property name="text">
1626+
<string>Addresses Processed</string>
1627+
</property>
1628+
</widget>
1629+
</item>
1630+
<item row="24" column="1">
1631+
<widget class="QLabel" name="peerAddrProcessed">
1632+
<property name="cursor">
1633+
<cursorShape>IBeamCursor</cursorShape>
1634+
</property>
1635+
<property name="text">
1636+
<string>N/A</string>
1637+
</property>
1638+
<property name="textFormat">
1639+
<enum>Qt::PlainText</enum>
1640+
</property>
1641+
<property name="textInteractionFlags">
1642+
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
1643+
</property>
1644+
</widget>
1645+
</item>
1646+
<item row="25" column="0">
1647+
<widget class="QLabel" name="peerAddrRateLimitedLabel">
1648+
<property name="toolTip">
1649+
<string extracomment="Tooltip text for the Addresses Rate-Limited field in the peer details area.">Total number of addresses dropped due to rate-limiting.</string>
1650+
</property>
1651+
<property name="text">
1652+
<string>Addresses Rate-Limited</string>
1653+
</property>
1654+
</widget>
1655+
</item>
1656+
<item row="25" column="1">
1657+
<widget class="QLabel" name="peerAddrRateLimited">
1658+
<property name="cursor">
1659+
<cursorShape>IBeamCursor</cursorShape>
1660+
</property>
1661+
<property name="text">
1662+
<string>N/A</string>
1663+
</property>
1664+
<property name="textFormat">
1665+
<enum>Qt::PlainText</enum>
1666+
</property>
1667+
<property name="textInteractionFlags">
1668+
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
1669+
</property>
1670+
</widget>
1671+
</item>
1672+
<item row="26" column="0">
15951673
<spacer name="verticalSpacer_3">
15961674
<property name="orientation">
15971675
<enum>Qt::Vertical</enum>

src/qt/rpcconsole.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -1215,6 +1215,9 @@ void RPCConsole::updateDetailWidget()
12151215
}
12161216
ui->peerHeight->setText(QString::number(stats->nodeStateStats.m_starting_height));
12171217
ui->peerPingWait->setText(GUIUtil::formatPingTime(stats->nodeStateStats.m_ping_wait));
1218+
ui->peerAddrRelayEnabled->setText(stats->nodeStateStats.m_addr_relay_enabled ? ts.yes : ts.no);
1219+
ui->peerAddrProcessed->setText(QString::number(stats->nodeStateStats.m_addr_processed));
1220+
ui->peerAddrRateLimited->setText(QString::number(stats->nodeStateStats.m_addr_rate_limited));
12181221
}
12191222

12201223
ui->peersTabRightPanel->show();

0 commit comments

Comments
 (0)