Skip to content

Commit a5b349a

Browse files
committed
gui: add "Last Block" (CNodeStats::nLastBlockTime) to peer details
1 parent a21be7c commit a5b349a

File tree

2 files changed

+47
-20
lines changed

2 files changed

+47
-20
lines changed

src/qt/forms/debugwindow.ui

Lines changed: 46 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1342,6 +1342,32 @@
13421342
</widget>
13431343
</item>
13441344
<item row="12" column="0">
1345+
<widget class="QLabel" name="peerLastBlockLabel">
1346+
<property name="toolTip">
1347+
<string>Elapsed time since a novel block passing initial validity checks was received from this peer.</string>
1348+
</property>
1349+
<property name="text">
1350+
<string>Last Block</string>
1351+
</property>
1352+
</widget>
1353+
</item>
1354+
<item row="12" column="1">
1355+
<widget class="QLabel" name="peerLastBlock">
1356+
<property name="cursor">
1357+
<cursorShape>IBeamCursor</cursorShape>
1358+
</property>
1359+
<property name="text">
1360+
<string>N/A</string>
1361+
</property>
1362+
<property name="textFormat">
1363+
<enum>Qt::PlainText</enum>
1364+
</property>
1365+
<property name="textInteractionFlags">
1366+
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
1367+
</property>
1368+
</widget>
1369+
</item>
1370+
<item row="13" column="0">
13451371
<widget class="QLabel" name="peerLastTxLabel">
13461372
<property name="toolTip">
13471373
<string>Elapsed time since a novel transaction accepted into our mempool was received from this peer.</string>
@@ -1351,7 +1377,7 @@
13511377
</property>
13521378
</widget>
13531379
</item>
1354-
<item row="12" column="1">
1380+
<item row="13" column="1">
13551381
<widget class="QLabel" name="peerLastTx">
13561382
<property name="cursor">
13571383
<cursorShape>IBeamCursor</cursorShape>
@@ -1367,14 +1393,14 @@
13671393
</property>
13681394
</widget>
13691395
</item>
1370-
<item row="13" column="0">
1396+
<item row="14" column="0">
13711397
<widget class="QLabel" name="label_15">
13721398
<property name="text">
13731399
<string>Last Send</string>
13741400
</property>
13751401
</widget>
13761402
</item>
1377-
<item row="13" column="1">
1403+
<item row="14" column="1">
13781404
<widget class="QLabel" name="peerLastSend">
13791405
<property name="cursor">
13801406
<cursorShape>IBeamCursor</cursorShape>
@@ -1390,14 +1416,14 @@
13901416
</property>
13911417
</widget>
13921418
</item>
1393-
<item row="14" column="0">
1419+
<item row="15" column="0">
13941420
<widget class="QLabel" name="label_19">
13951421
<property name="text">
13961422
<string>Last Receive</string>
13971423
</property>
13981424
</widget>
13991425
</item>
1400-
<item row="14" column="1">
1426+
<item row="15" column="1">
14011427
<widget class="QLabel" name="peerLastRecv">
14021428
<property name="cursor">
14031429
<cursorShape>IBeamCursor</cursorShape>
@@ -1413,14 +1439,14 @@
14131439
</property>
14141440
</widget>
14151441
</item>
1416-
<item row="15" column="0">
1442+
<item row="16" column="0">
14171443
<widget class="QLabel" name="label_18">
14181444
<property name="text">
14191445
<string>Sent</string>
14201446
</property>
14211447
</widget>
14221448
</item>
1423-
<item row="15" column="1">
1449+
<item row="16" column="1">
14241450
<widget class="QLabel" name="peerBytesSent">
14251451
<property name="cursor">
14261452
<cursorShape>IBeamCursor</cursorShape>
@@ -1436,14 +1462,14 @@
14361462
</property>
14371463
</widget>
14381464
</item>
1439-
<item row="16" column="0">
1465+
<item row="17" column="0">
14401466
<widget class="QLabel" name="label_20">
14411467
<property name="text">
14421468
<string>Received</string>
14431469
</property>
14441470
</widget>
14451471
</item>
1446-
<item row="16" column="1">
1472+
<item row="17" column="1">
14471473
<widget class="QLabel" name="peerBytesRecv">
14481474
<property name="cursor">
14491475
<cursorShape>IBeamCursor</cursorShape>
@@ -1459,14 +1485,14 @@
14591485
</property>
14601486
</widget>
14611487
</item>
1462-
<item row="17" column="0">
1488+
<item row="18" column="0">
14631489
<widget class="QLabel" name="label_26">
14641490
<property name="text">
14651491
<string>Ping Time</string>
14661492
</property>
14671493
</widget>
14681494
</item>
1469-
<item row="17" column="1">
1495+
<item row="18" column="1">
14701496
<widget class="QLabel" name="peerPingTime">
14711497
<property name="cursor">
14721498
<cursorShape>IBeamCursor</cursorShape>
@@ -1482,7 +1508,7 @@
14821508
</property>
14831509
</widget>
14841510
</item>
1485-
<item row="18" column="0">
1511+
<item row="19" column="0">
14861512
<widget class="QLabel" name="peerPingWaitLabel">
14871513
<property name="toolTip">
14881514
<string>The duration of a currently outstanding ping.</string>
@@ -1492,7 +1518,7 @@
14921518
</property>
14931519
</widget>
14941520
</item>
1495-
<item row="18" column="1">
1521+
<item row="19" column="1">
14961522
<widget class="QLabel" name="peerPingWait">
14971523
<property name="cursor">
14981524
<cursorShape>IBeamCursor</cursorShape>
@@ -1508,14 +1534,14 @@
15081534
</property>
15091535
</widget>
15101536
</item>
1511-
<item row="19" column="0">
1537+
<item row="20" column="0">
15121538
<widget class="QLabel" name="peerMinPingLabel">
15131539
<property name="text">
15141540
<string>Min Ping</string>
15151541
</property>
15161542
</widget>
15171543
</item>
1518-
<item row="19" column="1">
1544+
<item row="20" column="1">
15191545
<widget class="QLabel" name="peerMinPing">
15201546
<property name="cursor">
15211547
<cursorShape>IBeamCursor</cursorShape>
@@ -1531,14 +1557,14 @@
15311557
</property>
15321558
</widget>
15331559
</item>
1534-
<item row="20" column="0">
1560+
<item row="21" column="0">
15351561
<widget class="QLabel" name="label_timeoffset">
15361562
<property name="text">
15371563
<string>Time Offset</string>
15381564
</property>
15391565
</widget>
15401566
</item>
1541-
<item row="20" column="1">
1567+
<item row="21" column="1">
15421568
<widget class="QLabel" name="timeoffset">
15431569
<property name="cursor">
15441570
<cursorShape>IBeamCursor</cursorShape>
@@ -1554,7 +1580,7 @@
15541580
</property>
15551581
</widget>
15561582
</item>
1557-
<item row="21" column="0">
1583+
<item row="22" column="0">
15581584
<widget class="QLabel" name="peerMappedASLabel">
15591585
<property name="toolTip">
15601586
<string>The mapped Autonomous System used for diversifying peer selection.</string>
@@ -1564,7 +1590,7 @@
15641590
</property>
15651591
</widget>
15661592
</item>
1567-
<item row="21" column="1">
1593+
<item row="22" column="1">
15681594
<widget class="QLabel" name="peerMappedAS">
15691595
<property name="cursor">
15701596
<cursorShape>IBeamCursor</cursorShape>
@@ -1580,7 +1606,7 @@
15801606
</property>
15811607
</widget>
15821608
</item>
1583-
<item row="22" column="0">
1609+
<item row="23" column="0">
15841610
<spacer name="verticalSpacer_3">
15851611
<property name="orientation">
15861612
<enum>Qt::Vertical</enum>

src/qt/rpcconsole.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1122,6 +1122,7 @@ void RPCConsole::updateDetailWidget()
11221122
ui->peerHighBandwidth->setText(bip152_hb_settings);
11231123
const int64_t time_now{GetSystemTimeInSeconds()};
11241124
ui->peerConnTime->setText(GUIUtil::formatDurationStr(time_now - stats->nodeStats.nTimeConnected));
1125+
ui->peerLastBlock->setText(TimeDurationField(time_now, stats->nodeStats.nLastBlockTime));
11251126
ui->peerLastTx->setText(TimeDurationField(time_now, stats->nodeStats.nLastTXTime));
11261127
ui->peerLastSend->setText(TimeDurationField(time_now, stats->nodeStats.nLastSend));
11271128
ui->peerLastRecv->setText(TimeDurationField(time_now, stats->nodeStats.nLastRecv));

0 commit comments

Comments
 (0)