[qt] Set peer version and subversion to N/A when not available or detecting
What changed, and why it matters
This is a tiny user-interface fix in Bitcoin Core's Qt wallet. When viewing details about a connected network peer, the version and subversion fields now show 'N/A' if the information isn't available, instead of leaving the field blank. It does not change network behavior, consensus rules, or security-sensitive logic.
No security action needed. Treat as a normal UI polish change.
Security signals we found
No strong security signals were identified.
Evidence from the diff
In src/qt/rpcconsole.cpp, the peer detail update code previously only set the peerVersion and peerSubversion labels when data was present, leaving them stale/blank otherwise. The patch unconditionally assigns the label text: the numeric version if non-zero, else the localized ‘N/A’ string; the clean subversion if non-empty, else ‘N/A’. This is purely presentational and has no effect on protocol handling, validation, or RPC behavior.
Changed components
src/qt/rpcconsole.cpp (Qt RPC console peer detail widget)Inspect captured patch +2 / −6
diff --git a/src/qt/rpcconsole.cpp b/src/qt/rpcconsole.cpp
index f9b850dc..9dbccc11 100644
--- a/src/qt/rpcconsole.cpp
+++ b/src/qt/rpcconsole.cpp
@@ -1172,12 +1172,8 @@ void RPCConsole::updateDetailWidget()
ui->peerBytesRecv->setText(GUIUtil::formatBytes(stats->nodeStats.nRecvBytes));
ui->peerPingTime->setText(GUIUtil::formatPingTime(stats->nodeStats.m_last_ping_time));
ui->peerMinPing->setText(GUIUtil::formatPingTime(stats->nodeStats.m_min_ping_time));
- if (stats->nodeStats.nVersion) {
- ui->peerVersion->setText(QString::number(stats->nodeStats.nVersion));
- }
- if (!stats->nodeStats.cleanSubVer.empty()) {
- ui->peerSubversion->setText(QString::fromStdString(stats->nodeStats.cleanSubVer));
- }
+ ui->peerVersion->setText(stats->nodeStats.nVersion ? QString::number(stats->nodeStats.nVersion) : ts.na);
+ ui->peerSubversion->setText(!stats->nodeStats.cleanSubVer.empty() ? QString::fromStdString(stats->nodeStats.cleanSubVer) : ts.na);
ui->peerConnectionType->setText(GUIUtil::ConnectionTypeToQString(stats->nodeStats.m_conn_type, /*prepend_direction=*/true));
ui->peerTransportType->setText(QString::fromStdString(TransportTypeAsString(stats->nodeStats.m_transport_type)));
if (stats->nodeStats.m_transport_type == TransportProtocolType::V2) {
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.