Add "Last Block" and "Last Tx" rows to peer details area#226
Conversation
|
Thanks for having a look, @jarolrod! Much appreciated. The docs echo the ones I added in the which I think are a bit more useful to users than the equivalent ones I added in the getpeerinfo rpc help (I've been adding these docs everywhere, hehe). For example, if we receive a novel block that does not pass initial validity checks, or a novel transaction that isn't accepted into our mempool, it won't appear--and the simplified docs would be incorrect. A user might wonder why, but the answers are difficult for casual users to glean from reading the code, and while writing the docs it took some review discussion with others to get this info cleared up. So it seems worth documenting when we have the space to do so. |
|
@jonatack thanks for the context, looks good to me then 👍 |
|
Concept ACK. Will review in the morning :) |
c275898 to
a5b349a
Compare
|
Updated per |
hebasto
left a comment
There was a problem hiding this comment.
ACK a5b349a, tested on Linux Mint 20.1 (Qt 5.12.8):
piconit: while here why not to fix indentation from #179:
--- 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>a5b349a to
70d3c5d
Compare
|
Thanks @hebasto, done. |
Summary: > qt: add RPCConsole::TimeDurationField helper, call systime only once > gui: add "Last Tx" (CNodeStats::nLastTXTime) to peer details > gui: add "Last Block" (CNodeStats::nLastBlockTime) to peer details This is a backport of [[bitcoin-core/gui#226 | core-gui#226]] Depends on D10963 Test Plan: `ninja && src/qt/bitcoin-qt` Select a peer in the "peers" view, check the new "Last Block/Tx" fields. Wait for a while to see it change from "Never" to a duration. Reviewers: #bitcoin_abc, Fabien Reviewed By: #bitcoin_abc, Fabien Differential Revision: https://reviews.bitcoinabc.org/D10964






RPCConsole::TimeDurationFieldhelper to replace repeated code and call system time only once inRPCConsole::updateDetailWidgetCNodeStats::nLastTXTime) field to peer detailsCNodeStats::nLastBlockTime) field to peer details