diff options
author | Jon Atack <jon@atack.com> | 2021-02-24 16:26:39 +0100 |
---|---|---|
committer | Jon Atack <jon@atack.com> | 2021-02-25 12:25:07 +0100 |
commit | 70d3c5d0b987411873d557440607aa4f3f65b1ec (patch) | |
tree | 99a09fde9811a421a06d9dbaf41977c120a7d1f5 | |
parent | a21be7c401e1b885bb338645248f40023af7a88f (diff) |
gui: add "Last Block" (CNodeStats::nLastBlockTime) to peer details
-rw-r--r-- | src/qt/forms/debugwindow.ui | 68 | ||||
-rw-r--r-- | src/qt/rpcconsole.cpp | 1 |
2 files changed, 48 insertions, 21 deletions
diff --git a/src/qt/forms/debugwindow.ui b/src/qt/forms/debugwindow.ui index 318eca6c59..e45cafe48a 100644 --- a/src/qt/forms/debugwindow.ui +++ b/src/qt/forms/debugwindow.ui @@ -1079,7 +1079,7 @@ <item row="1" column="0"> <widget class="QLabel" name="peerConnectionTypeLabel"> <property name="toolTip"> - <string>The direction and type of peer connection: %1</string> + <string>The direction and type of peer connection: %1</string> </property> <property name="text"> <string>Direction/Type</string> @@ -1342,6 +1342,32 @@ </widget> </item> <item row="12" column="0"> + <widget class="QLabel" name="peerLastBlockLabel"> + <property name="toolTip"> + <string>Elapsed time since a novel block passing initial validity checks was received from this peer.</string> + </property> + <property name="text"> + <string>Last Block</string> + </property> + </widget> + </item> + <item row="12" column="1"> + <widget class="QLabel" name="peerLastBlock"> + <property name="cursor"> + <cursorShape>IBeamCursor</cursorShape> + </property> + <property name="text"> + <string>N/A</string> + </property> + <property name="textFormat"> + <enum>Qt::PlainText</enum> + </property> + <property name="textInteractionFlags"> + <set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set> + </property> + </widget> + </item> + <item row="13" column="0"> <widget class="QLabel" name="peerLastTxLabel"> <property name="toolTip"> <string>Elapsed time since a novel transaction accepted into our mempool was received from this peer.</string> @@ -1351,7 +1377,7 @@ </property> </widget> </item> - <item row="12" column="1"> + <item row="13" column="1"> <widget class="QLabel" name="peerLastTx"> <property name="cursor"> <cursorShape>IBeamCursor</cursorShape> @@ -1367,14 +1393,14 @@ </property> </widget> </item> - <item row="13" column="0"> + <item row="14" column="0"> <widget class="QLabel" name="label_15"> <property name="text"> <string>Last Send</string> </property> </widget> </item> - <item row="13" column="1"> + <item row="14" column="1"> <widget class="QLabel" name="peerLastSend"> <property name="cursor"> <cursorShape>IBeamCursor</cursorShape> @@ -1390,14 +1416,14 @@ </property> </widget> </item> - <item row="14" column="0"> + <item row="15" column="0"> <widget class="QLabel" name="label_19"> <property name="text"> <string>Last Receive</string> </property> </widget> </item> - <item row="14" column="1"> + <item row="15" column="1"> <widget class="QLabel" name="peerLastRecv"> <property name="cursor"> <cursorShape>IBeamCursor</cursorShape> @@ -1413,14 +1439,14 @@ </property> </widget> </item> - <item row="15" column="0"> + <item row="16" column="0"> <widget class="QLabel" name="label_18"> <property name="text"> <string>Sent</string> </property> </widget> </item> - <item row="15" column="1"> + <item row="16" column="1"> <widget class="QLabel" name="peerBytesSent"> <property name="cursor"> <cursorShape>IBeamCursor</cursorShape> @@ -1436,14 +1462,14 @@ </property> </widget> </item> - <item row="16" column="0"> + <item row="17" column="0"> <widget class="QLabel" name="label_20"> <property name="text"> <string>Received</string> </property> </widget> </item> - <item row="16" column="1"> + <item row="17" column="1"> <widget class="QLabel" name="peerBytesRecv"> <property name="cursor"> <cursorShape>IBeamCursor</cursorShape> @@ -1459,14 +1485,14 @@ </property> </widget> </item> - <item row="17" column="0"> + <item row="18" column="0"> <widget class="QLabel" name="label_26"> <property name="text"> <string>Ping Time</string> </property> </widget> </item> - <item row="17" column="1"> + <item row="18" column="1"> <widget class="QLabel" name="peerPingTime"> <property name="cursor"> <cursorShape>IBeamCursor</cursorShape> @@ -1482,7 +1508,7 @@ </property> </widget> </item> - <item row="18" column="0"> + <item row="19" column="0"> <widget class="QLabel" name="peerPingWaitLabel"> <property name="toolTip"> <string>The duration of a currently outstanding ping.</string> @@ -1492,7 +1518,7 @@ </property> </widget> </item> - <item row="18" column="1"> + <item row="19" column="1"> <widget class="QLabel" name="peerPingWait"> <property name="cursor"> <cursorShape>IBeamCursor</cursorShape> @@ -1508,14 +1534,14 @@ </property> </widget> </item> - <item row="19" column="0"> + <item row="20" column="0"> <widget class="QLabel" name="peerMinPingLabel"> <property name="text"> <string>Min Ping</string> </property> </widget> </item> - <item row="19" column="1"> + <item row="20" column="1"> <widget class="QLabel" name="peerMinPing"> <property name="cursor"> <cursorShape>IBeamCursor</cursorShape> @@ -1531,14 +1557,14 @@ </property> </widget> </item> - <item row="20" column="0"> + <item row="21" column="0"> <widget class="QLabel" name="label_timeoffset"> <property name="text"> <string>Time Offset</string> </property> </widget> </item> - <item row="20" column="1"> + <item row="21" column="1"> <widget class="QLabel" name="timeoffset"> <property name="cursor"> <cursorShape>IBeamCursor</cursorShape> @@ -1554,7 +1580,7 @@ </property> </widget> </item> - <item row="21" column="0"> + <item row="22" column="0"> <widget class="QLabel" name="peerMappedASLabel"> <property name="toolTip"> <string>The mapped Autonomous System used for diversifying peer selection.</string> @@ -1564,7 +1590,7 @@ </property> </widget> </item> - <item row="21" column="1"> + <item row="22" column="1"> <widget class="QLabel" name="peerMappedAS"> <property name="cursor"> <cursorShape>IBeamCursor</cursorShape> @@ -1580,7 +1606,7 @@ </property> </widget> </item> - <item row="22" column="0"> + <item row="23" column="0"> <spacer name="verticalSpacer_3"> <property name="orientation"> <enum>Qt::Vertical</enum> diff --git a/src/qt/rpcconsole.cpp b/src/qt/rpcconsole.cpp index 3bd6d94a58..5acf8b1cf0 100644 --- a/src/qt/rpcconsole.cpp +++ b/src/qt/rpcconsole.cpp @@ -1122,6 +1122,7 @@ void RPCConsole::updateDetailWidget() ui->peerHighBandwidth->setText(bip152_hb_settings); const int64_t time_now{GetSystemTimeInSeconds()}; ui->peerConnTime->setText(GUIUtil::formatDurationStr(time_now - stats->nodeStats.nTimeConnected)); + ui->peerLastBlock->setText(TimeDurationField(time_now, stats->nodeStats.nLastBlockTime)); ui->peerLastTx->setText(TimeDurationField(time_now, stats->nodeStats.nLastTXTime)); ui->peerLastSend->setText(TimeDurationField(time_now, stats->nodeStats.nLastSend)); ui->peerLastRecv->setText(TimeDurationField(time_now, stats->nodeStats.nLastRecv)); |