aboutsummaryrefslogtreecommitdiff
path: root/src/qt
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2021-12-15 13:07:07 +0100
committerMarcoFalke <falke.marco@gmail.com>2021-12-15 13:07:34 +0100
commit60b5795133a2f6bed5d68340c5f5b6c225fa9cdb (patch)
treeb42b59a28c4fb49b0286163d3561498e96bf89eb /src/qt
parent2d0bdb2089644f5904629413423cdc897911b081 (diff)
parentfad943821e35d0eb2143061e718f0193e12a4c71 (diff)
Merge bitcoin/bitcoin#23758: net: Use type-safe mockable time for peer connection time
fad943821e35d0eb2143061e718f0193e12a4c71 scripted-diff: Rename touched member variables (MarcoFalke) fa663a4c0d20487ed3f7a93e1c2ca9932b05f5a8 Use mockable time for peer connection time (MarcoFalke) fad7ead146a152f46b25ce6623e05cbb1dbc8cca refactor: Use type-safe std::chrono in net (MarcoFalke) Pull request description: Benefits: * Type-safe * Mockable * Allows to revert a temporary test workaround ACKs for top commit: naumenkogs: ACK fad943821e35d0eb2143061e718f0193e12a4c71 shaavan: ACK fad943821e35d0eb2143061e718f0193e12a4c71 Tree-SHA512: af9bdfc695ab727b100c6810a7289d29b02b0ea9fa4fee9cc1f3eeefb52c8c465ea2734bae0c1c63b3b0d6264ba2c493268bc970ef6916570eb166de77829d82
Diffstat (limited to 'src/qt')
-rw-r--r--src/qt/rpcconsole.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/qt/rpcconsole.cpp b/src/qt/rpcconsole.cpp
index 5d08aff6b9..9f06d225c0 100644
--- a/src/qt/rpcconsole.cpp
+++ b/src/qt/rpcconsole.cpp
@@ -1173,9 +1173,9 @@ void RPCConsole::updateDetailWidget()
if (bip152_hb_settings.isEmpty()) bip152_hb_settings = ts.no;
ui->peerHighBandwidth->setText(bip152_hb_settings);
const auto time_now{GetTime<std::chrono::seconds>()};
- ui->peerConnTime->setText(GUIUtil::formatDurationStr(time_now - std::chrono::seconds{stats->nodeStats.nTimeConnected}));
- ui->peerLastBlock->setText(TimeDurationField(time_now, std::chrono::seconds{stats->nodeStats.nLastBlockTime}));
- ui->peerLastTx->setText(TimeDurationField(time_now, std::chrono::seconds{stats->nodeStats.nLastTXTime}));
+ ui->peerConnTime->setText(GUIUtil::formatDurationStr(time_now - stats->nodeStats.m_connected));
+ ui->peerLastBlock->setText(TimeDurationField(time_now, stats->nodeStats.m_last_block_time));
+ ui->peerLastTx->setText(TimeDurationField(time_now, stats->nodeStats.m_last_tx_time));
ui->peerLastSend->setText(TimeDurationField(time_now, stats->nodeStats.m_last_send));
ui->peerLastRecv->setText(TimeDurationField(time_now, stats->nodeStats.m_last_recv));
ui->peerBytesSent->setText(GUIUtil::formatBytes(stats->nodeStats.nSendBytes));