Skip to content

Commit a21be7c

Browse files
committed
gui: add "Last Tx" (CNodeStats::nLastTXTime) to peer details
1 parent 4dc2fd6 commit a21be7c

File tree

2 files changed

+45
-18
lines changed

2 files changed

+45
-18
lines changed

src/qt/forms/debugwindow.ui

Lines changed: 44 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1342,13 +1342,39 @@
13421342
</widget>
13431343
</item>
13441344
<item row="12" column="0">
1345+
<widget class="QLabel" name="peerLastTxLabel">
1346+
<property name="toolTip">
1347+
<string>Elapsed time since a novel transaction accepted into our mempool was received from this peer.</string>
1348+
</property>
1349+
<property name="text">
1350+
<string>Last Tx</string>
1351+
</property>
1352+
</widget>
1353+
</item>
1354+
<item row="12" column="1">
1355+
<widget class="QLabel" name="peerLastTx">
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="label_15">
13461372
<property name="text">
13471373
<string>Last Send</string>
13481374
</property>
13491375
</widget>
13501376
</item>
1351-
<item row="12" column="1">
1377+
<item row="13" column="1">
13521378
<widget class="QLabel" name="peerLastSend">
13531379
<property name="cursor">
13541380
<cursorShape>IBeamCursor</cursorShape>
@@ -1364,14 +1390,14 @@
13641390
</property>
13651391
</widget>
13661392
</item>
1367-
<item row="13" column="0">
1393+
<item row="14" column="0">
13681394
<widget class="QLabel" name="label_19">
13691395
<property name="text">
13701396
<string>Last Receive</string>
13711397
</property>
13721398
</widget>
13731399
</item>
1374-
<item row="13" column="1">
1400+
<item row="14" column="1">
13751401
<widget class="QLabel" name="peerLastRecv">
13761402
<property name="cursor">
13771403
<cursorShape>IBeamCursor</cursorShape>
@@ -1387,14 +1413,14 @@
13871413
</property>
13881414
</widget>
13891415
</item>
1390-
<item row="14" column="0">
1416+
<item row="15" column="0">
13911417
<widget class="QLabel" name="label_18">
13921418
<property name="text">
13931419
<string>Sent</string>
13941420
</property>
13951421
</widget>
13961422
</item>
1397-
<item row="14" column="1">
1423+
<item row="15" column="1">
13981424
<widget class="QLabel" name="peerBytesSent">
13991425
<property name="cursor">
14001426
<cursorShape>IBeamCursor</cursorShape>
@@ -1410,14 +1436,14 @@
14101436
</property>
14111437
</widget>
14121438
</item>
1413-
<item row="15" column="0">
1439+
<item row="16" column="0">
14141440
<widget class="QLabel" name="label_20">
14151441
<property name="text">
14161442
<string>Received</string>
14171443
</property>
14181444
</widget>
14191445
</item>
1420-
<item row="15" column="1">
1446+
<item row="16" column="1">
14211447
<widget class="QLabel" name="peerBytesRecv">
14221448
<property name="cursor">
14231449
<cursorShape>IBeamCursor</cursorShape>
@@ -1433,14 +1459,14 @@
14331459
</property>
14341460
</widget>
14351461
</item>
1436-
<item row="16" column="0">
1462+
<item row="17" column="0">
14371463
<widget class="QLabel" name="label_26">
14381464
<property name="text">
14391465
<string>Ping Time</string>
14401466
</property>
14411467
</widget>
14421468
</item>
1443-
<item row="16" column="1">
1469+
<item row="17" column="1">
14441470
<widget class="QLabel" name="peerPingTime">
14451471
<property name="cursor">
14461472
<cursorShape>IBeamCursor</cursorShape>
@@ -1456,7 +1482,7 @@
14561482
</property>
14571483
</widget>
14581484
</item>
1459-
<item row="17" column="0">
1485+
<item row="18" column="0">
14601486
<widget class="QLabel" name="peerPingWaitLabel">
14611487
<property name="toolTip">
14621488
<string>The duration of a currently outstanding ping.</string>
@@ -1466,7 +1492,7 @@
14661492
</property>
14671493
</widget>
14681494
</item>
1469-
<item row="17" column="1">
1495+
<item row="18" column="1">
14701496
<widget class="QLabel" name="peerPingWait">
14711497
<property name="cursor">
14721498
<cursorShape>IBeamCursor</cursorShape>
@@ -1482,14 +1508,14 @@
14821508
</property>
14831509
</widget>
14841510
</item>
1485-
<item row="18" column="0">
1511+
<item row="19" column="0">
14861512
<widget class="QLabel" name="peerMinPingLabel">
14871513
<property name="text">
14881514
<string>Min Ping</string>
14891515
</property>
14901516
</widget>
14911517
</item>
1492-
<item row="18" column="1">
1518+
<item row="19" column="1">
14931519
<widget class="QLabel" name="peerMinPing">
14941520
<property name="cursor">
14951521
<cursorShape>IBeamCursor</cursorShape>
@@ -1505,14 +1531,14 @@
15051531
</property>
15061532
</widget>
15071533
</item>
1508-
<item row="19" column="0">
1534+
<item row="20" column="0">
15091535
<widget class="QLabel" name="label_timeoffset">
15101536
<property name="text">
15111537
<string>Time Offset</string>
15121538
</property>
15131539
</widget>
15141540
</item>
1515-
<item row="19" column="1">
1541+
<item row="20" column="1">
15161542
<widget class="QLabel" name="timeoffset">
15171543
<property name="cursor">
15181544
<cursorShape>IBeamCursor</cursorShape>
@@ -1528,7 +1554,7 @@
15281554
</property>
15291555
</widget>
15301556
</item>
1531-
<item row="20" column="0">
1557+
<item row="21" column="0">
15321558
<widget class="QLabel" name="peerMappedASLabel">
15331559
<property name="toolTip">
15341560
<string>The mapped Autonomous System used for diversifying peer selection.</string>
@@ -1538,7 +1564,7 @@
15381564
</property>
15391565
</widget>
15401566
</item>
1541-
<item row="20" column="1">
1567+
<item row="21" column="1">
15421568
<widget class="QLabel" name="peerMappedAS">
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
<spacer name="verticalSpacer_3">
15591585
<property name="orientation">
15601586
<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->peerLastTx->setText(TimeDurationField(time_now, stats->nodeStats.nLastTXTime));
11251126
ui->peerLastSend->setText(TimeDurationField(time_now, stats->nodeStats.nLastSend));
11261127
ui->peerLastRecv->setText(TimeDurationField(time_now, stats->nodeStats.nLastRecv));
11271128
ui->peerBytesSent->setText(GUIUtil::formatBytes(stats->nodeStats.nSendBytes));

0 commit comments

Comments
 (0)