Skip to content

Commit 1cbf3b9

Browse files
committed
merge bitcoin-core/gui#206: Display fRelayTxes and bip152_highbandwidth_{to, from} in peer details
continuation of 3e8ba24 from dash#5964 includes: - 142807a
1 parent 2390621 commit 1cbf3b9

File tree

2 files changed

+72
-36
lines changed

2 files changed

+72
-36
lines changed

src/qt/forms/debugwindow.ui

Lines changed: 62 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1150,13 +1150,39 @@
11501150
</widget>
11511151
</item>
11521152
<item row="9" column="0">
1153+
<widget class="QLabel" name="peerHighBandwidthLabel">
1154+
<property name="toolTip">
1155+
<string>High bandwidth BIP152 compact block relay: %1</string>
1156+
</property>
1157+
<property name="text">
1158+
<string>High Bandwidth</string>
1159+
</property>
1160+
</widget>
1161+
</item>
1162+
<item row="9" column="2">
1163+
<widget class="QLabel" name="peerHighBandwidth">
1164+
<property name="cursor">
1165+
<cursorShape>IBeamCursor</cursorShape>
1166+
</property>
1167+
<property name="text">
1168+
<string>N/A</string>
1169+
</property>
1170+
<property name="textFormat">
1171+
<enum>Qt::PlainText</enum>
1172+
</property>
1173+
<property name="textInteractionFlags">
1174+
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
1175+
</property>
1176+
</widget>
1177+
</item>
1178+
<item row="10" column="0">
11531179
<widget class="QLabel" name="label_29">
11541180
<property name="text">
11551181
<string>Starting Block</string>
11561182
</property>
11571183
</widget>
11581184
</item>
1159-
<item row="9" column="2">
1185+
<item row="10" column="2">
11601186
<widget class="QLabel" name="peerHeight">
11611187
<property name="cursor">
11621188
<cursorShape>IBeamCursor</cursorShape>
@@ -1172,14 +1198,14 @@
11721198
</property>
11731199
</widget>
11741200
</item>
1175-
<item row="10" column="0">
1201+
<item row="11" column="0">
11761202
<widget class="QLabel" name="label_27">
11771203
<property name="text">
11781204
<string>Synced Headers</string>
11791205
</property>
11801206
</widget>
11811207
</item>
1182-
<item row="10" column="2">
1208+
<item row="11" column="2">
11831209
<widget class="QLabel" name="peerSyncHeight">
11841210
<property name="cursor">
11851211
<cursorShape>IBeamCursor</cursorShape>
@@ -1195,14 +1221,14 @@
11951221
</property>
11961222
</widget>
11971223
</item>
1198-
<item row="11" column="0">
1224+
<item row="12" column="0">
11991225
<widget class="QLabel" name="label_25">
12001226
<property name="text">
12011227
<string>Synced Blocks</string>
12021228
</property>
12031229
</widget>
12041230
</item>
1205-
<item row="11" column="2">
1231+
<item row="12" column="2">
12061232
<widget class="QLabel" name="peerCommonHeight">
12071233
<property name="cursor">
12081234
<cursorShape>IBeamCursor</cursorShape>
@@ -1218,14 +1244,14 @@
12181244
</property>
12191245
</widget>
12201246
</item>
1221-
<item row="12" column="0">
1247+
<item row="13" column="0">
12221248
<widget class="QLabel" name="label_22">
12231249
<property name="text">
12241250
<string>Connection Time</string>
12251251
</property>
12261252
</widget>
12271253
</item>
1228-
<item row="12" column="2">
1254+
<item row="13" column="2">
12291255
<widget class="QLabel" name="peerConnTime">
12301256
<property name="cursor">
12311257
<cursorShape>IBeamCursor</cursorShape>
@@ -1241,7 +1267,7 @@
12411267
</property>
12421268
</widget>
12431269
</item>
1244-
<item row="13" column="0">
1270+
<item row="14" column="0">
12451271
<widget class="QLabel" name="peerLastBlockLabel">
12461272
<property name="toolTip">
12471273
<string>Elapsed time since a novel block passing initial validity checks was received from this peer.</string>
@@ -1251,7 +1277,7 @@
12511277
</property>
12521278
</widget>
12531279
</item>
1254-
<item row="13" column="2">
1280+
<item row="14" column="2">
12551281
<widget class="QLabel" name="peerLastBlock">
12561282
<property name="cursor">
12571283
<cursorShape>IBeamCursor</cursorShape>
@@ -1267,7 +1293,7 @@
12671293
</property>
12681294
</widget>
12691295
</item>
1270-
<item row="14" column="0">
1296+
<item row="15" column="0">
12711297
<widget class="QLabel" name="peerLastTxLabel">
12721298
<property name="toolTip">
12731299
<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>
@@ -1277,7 +1303,7 @@
12771303
</property>
12781304
</widget>
12791305
</item>
1280-
<item row="14" column="2">
1306+
<item row="15" column="2">
12811307
<widget class="QLabel" name="peerLastTx">
12821308
<property name="cursor">
12831309
<cursorShape>IBeamCursor</cursorShape>
@@ -1293,14 +1319,14 @@
12931319
</property>
12941320
</widget>
12951321
</item>
1296-
<item row="15" column="0">
1322+
<item row="16" column="0">
12971323
<widget class="QLabel" name="label_15">
12981324
<property name="text">
12991325
<string>Last Send</string>
13001326
</property>
13011327
</widget>
13021328
</item>
1303-
<item row="15" column="2">
1329+
<item row="16" column="2">
13041330
<widget class="QLabel" name="peerLastSend">
13051331
<property name="cursor">
13061332
<cursorShape>IBeamCursor</cursorShape>
@@ -1316,14 +1342,14 @@
13161342
</property>
13171343
</widget>
13181344
</item>
1319-
<item row="16" column="0">
1345+
<item row="17" column="0">
13201346
<widget class="QLabel" name="label_19">
13211347
<property name="text">
13221348
<string>Last Receive</string>
13231349
</property>
13241350
</widget>
13251351
</item>
1326-
<item row="16" column="2">
1352+
<item row="17" column="2">
13271353
<widget class="QLabel" name="peerLastRecv">
13281354
<property name="cursor">
13291355
<cursorShape>IBeamCursor</cursorShape>
@@ -1339,14 +1365,14 @@
13391365
</property>
13401366
</widget>
13411367
</item>
1342-
<item row="17" column="0">
1368+
<item row="18" column="0">
13431369
<widget class="QLabel" name="label_18">
13441370
<property name="text">
13451371
<string>Sent</string>
13461372
</property>
13471373
</widget>
13481374
</item>
1349-
<item row="17" column="2">
1375+
<item row="18" column="2">
13501376
<widget class="QLabel" name="peerBytesSent">
13511377
<property name="cursor">
13521378
<cursorShape>IBeamCursor</cursorShape>
@@ -1362,14 +1388,14 @@
13621388
</property>
13631389
</widget>
13641390
</item>
1365-
<item row="18" column="0">
1391+
<item row="19" column="0">
13661392
<widget class="QLabel" name="label_20">
13671393
<property name="text">
13681394
<string>Received</string>
13691395
</property>
13701396
</widget>
13711397
</item>
1372-
<item row="18" column="2">
1398+
<item row="19" column="2">
13731399
<widget class="QLabel" name="peerBytesRecv">
13741400
<property name="cursor">
13751401
<cursorShape>IBeamCursor</cursorShape>
@@ -1385,14 +1411,14 @@
13851411
</property>
13861412
</widget>
13871413
</item>
1388-
<item row="19" column="0">
1414+
<item row="20" column="0">
13891415
<widget class="QLabel" name="label_26">
13901416
<property name="text">
13911417
<string>Ping Time</string>
13921418
</property>
13931419
</widget>
13941420
</item>
1395-
<item row="19" column="2">
1421+
<item row="20" column="2">
13961422
<widget class="QLabel" name="peerPingTime">
13971423
<property name="cursor">
13981424
<cursorShape>IBeamCursor</cursorShape>
@@ -1408,7 +1434,7 @@
14081434
</property>
14091435
</widget>
14101436
</item>
1411-
<item row="20" column="0">
1437+
<item row="21" column="0">
14121438
<widget class="QLabel" name="peerPingWaitLabel">
14131439
<property name="toolTip">
14141440
<string>The duration of a currently outstanding ping.</string>
@@ -1418,7 +1444,7 @@
14181444
</property>
14191445
</widget>
14201446
</item>
1421-
<item row="20" column="2">
1447+
<item row="21" column="2">
14221448
<widget class="QLabel" name="peerPingWait">
14231449
<property name="cursor">
14241450
<cursorShape>IBeamCursor</cursorShape>
@@ -1434,14 +1460,14 @@
14341460
</property>
14351461
</widget>
14361462
</item>
1437-
<item row="21" column="0">
1463+
<item row="22" column="0">
14381464
<widget class="QLabel" name="peerMinPingLabel">
14391465
<property name="text">
14401466
<string>Min Ping</string>
14411467
</property>
14421468
</widget>
14431469
</item>
1444-
<item row="21" column="2">
1470+
<item row="22" column="2">
14451471
<widget class="QLabel" name="peerMinPing">
14461472
<property name="cursor">
14471473
<cursorShape>IBeamCursor</cursorShape>
@@ -1457,14 +1483,14 @@
14571483
</property>
14581484
</widget>
14591485
</item>
1460-
<item row="22" column="0">
1486+
<item row="23" column="0">
14611487
<widget class="QLabel" name="label_timeoffset">
14621488
<property name="text">
14631489
<string>Time Offset</string>
14641490
</property>
14651491
</widget>
14661492
</item>
1467-
<item row="22" column="2">
1493+
<item row="23" column="2">
14681494
<widget class="QLabel" name="timeoffset">
14691495
<property name="cursor">
14701496
<cursorShape>IBeamCursor</cursorShape>
@@ -1480,7 +1506,7 @@
14801506
</property>
14811507
</widget>
14821508
</item>
1483-
<item row="23" column="0">
1509+
<item row="24" column="0">
14841510
<widget class="QLabel" name="peerMappedASLabel">
14851511
<property name="toolTip">
14861512
<string>The mapped Autonomous System used for diversifying peer selection.</string>
@@ -1490,7 +1516,7 @@
14901516
</property>
14911517
</widget>
14921518
</item>
1493-
<item row="23" column="2">
1519+
<item row="24" column="2">
14941520
<widget class="QLabel" name="peerMappedAS">
14951521
<property name="cursor">
14961522
<cursorShape>IBeamCursor</cursorShape>
@@ -1506,7 +1532,7 @@
15061532
</property>
15071533
</widget>
15081534
</item>
1509-
<item row="24" column="0">
1535+
<item row="25" column="0">
15101536
<widget class="QLabel" name="peerAddrRelayEnabledLabel">
15111537
<property name="toolTip">
15121538
<string extracomment="Tooltip text for the Address Relay field in the peer details area.">Whether we relay addresses to this peer.</string>
@@ -1516,7 +1542,7 @@
15161542
</property>
15171543
</widget>
15181544
</item>
1519-
<item row="24" column="2">
1545+
<item row="25" column="2">
15201546
<widget class="QLabel" name="peerAddrRelayEnabled">
15211547
<property name="cursor">
15221548
<cursorShape>IBeamCursor</cursorShape>
@@ -1532,7 +1558,7 @@
15321558
</property>
15331559
</widget>
15341560
</item>
1535-
<item row="25" column="0">
1561+
<item row="26" column="0">
15361562
<widget class="QLabel" name="peerAddrProcessedLabel">
15371563
<property name="toolTip">
15381564
<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>
@@ -1542,7 +1568,7 @@
15421568
</property>
15431569
</widget>
15441570
</item>
1545-
<item row="25" column="2">
1571+
<item row="26" column="2">
15461572
<widget class="QLabel" name="peerAddrProcessed">
15471573
<property name="cursor">
15481574
<cursorShape>IBeamCursor</cursorShape>
@@ -1558,7 +1584,7 @@
15581584
</property>
15591585
</widget>
15601586
</item>
1561-
<item row="26" column="0">
1587+
<item row="27" column="0">
15621588
<widget class="QLabel" name="peerAddrRateLimitedLabel">
15631589
<property name="toolTip">
15641590
<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>
@@ -1568,7 +1594,7 @@
15681594
</property>
15691595
</widget>
15701596
</item>
1571-
<item row="26" column="2">
1597+
<item row="27" column="2">
15721598
<widget class="QLabel" name="peerAddrRateLimited">
15731599
<property name="cursor">
15741600
<cursorShape>IBeamCursor</cursorShape>
@@ -1584,7 +1610,7 @@
15841610
</property>
15851611
</widget>
15861612
</item>
1587-
<item row="27" column="0">
1613+
<item row="28" column="0">
15881614
<spacer name="verticalSpacer_3">
15891615
<property name="orientation">
15901616
<enum>Qt::Vertical</enum>

src/qt/rpcconsole.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -514,6 +514,11 @@ RPCConsole::RPCConsole(interfaces::Node& node, QWidget* parent, Qt::WindowFlags
514514
tr("Outbound Address Fetch: short-lived, for soliciting addresses")};
515515
const QString list{"<ul><li>" + Join(CONNECTION_TYPE_DOC, QString("</li><li>")) + "</li></ul>"};
516516
ui->peerConnectionTypeLabel->setToolTip(ui->peerConnectionTypeLabel->toolTip().arg(list));
517+
const QString hb_list{"<ul><li>\""
518+
+ tr("To") + "\"" + tr("we selected the peer for high bandwidth relay") + "</li><li>\""
519+
+ tr("From") + "\"" + tr("the peer selected us for high bandwidth relay") + "</li><li>\""
520+
+ tr("No") + "\"" + tr("no high bandwidth relay selected") + "</li></ul>"};
521+
ui->peerHighBandwidthLabel->setToolTip(ui->peerHighBandwidthLabel->toolTip().arg(hb_list));
517522
ui->dataDir->setToolTip(ui->dataDir->toolTip().arg(QString(nonbreaking_hyphen) + "datadir"));
518523
ui->blocksDir->setToolTip(ui->blocksDir->toolTip().arg(QString(nonbreaking_hyphen) + "blocksdir"));
519524
ui->openDebugLogfileButton->setToolTip(ui->openDebugLogfileButton->toolTip().arg(PACKAGE_NAME));
@@ -1279,6 +1284,11 @@ void RPCConsole::updateDetailWidget()
12791284
ui->peerConnTime->setText(GUIUtil::formatDurationStr(time_now - std::chrono::seconds{stats->nodeStats.nTimeConnected}));
12801285
ui->peerLastBlock->setText(TimeDurationField(time_now, std::chrono::seconds{stats->nodeStats.nLastBlockTime}));
12811286
ui->peerLastTx->setText(TimeDurationField(time_now, std::chrono::seconds{stats->nodeStats.nLastTXTime}));
1287+
QString bip152_hb_settings;
1288+
if (stats->nodeStats.m_bip152_highbandwidth_to) bip152_hb_settings += "To";
1289+
if (stats->nodeStats.m_bip152_highbandwidth_from) bip152_hb_settings += (bip152_hb_settings == "" ? "From" : "/From");
1290+
if (bip152_hb_settings == "") bip152_hb_settings = "No";
1291+
ui->peerHighBandwidth->setText(bip152_hb_settings);
12821292
ui->peerLastSend->setText(TimeDurationField(time_now, stats->nodeStats.m_last_send));
12831293
ui->peerLastRecv->setText(TimeDurationField(time_now, stats->nodeStats.m_last_recv));
12841294
ui->peerBytesSent->setText(GUIUtil::formatBytes(stats->nodeStats.nSendBytes));

0 commit comments

Comments
 (0)