aboutsummaryrefslogtreecommitdiff
path: root/src/qt/peertablemodel.cpp
diff options
context:
space:
mode:
authorrandymcmillan <randy.lee.mcmillan@gmail.com>2022-02-10 01:45:25 -0500
committerrandymcmillan <randy.lee.mcmillan@gmail.com>2022-03-16 04:54:52 -0400
commit209301a442512579d57f79c82417dc7c496248b6 (patch)
treeda6d243e4d780548635b7056d302eeba56bbce06 /src/qt/peertablemodel.cpp
parent127de22c5fb396e1670d2a911faf7a9adc9241e2 (diff)
downloadbitcoin-209301a442512579d57f79c82417dc7c496248b6.tar.xz
gui: add Age column to peers tab
Co-authored-by: Jon Atack <jon@atack.com>
Diffstat (limited to 'src/qt/peertablemodel.cpp')
-rw-r--r--src/qt/peertablemodel.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/qt/peertablemodel.cpp b/src/qt/peertablemodel.cpp
index cd3193a1d2..32cb1f6ba0 100644
--- a/src/qt/peertablemodel.cpp
+++ b/src/qt/peertablemodel.cpp
@@ -71,6 +71,8 @@ QVariant PeerTableModel::data(const QModelIndex& index, int role) const
switch (column) {
case NetNodeId:
return (qint64)rec->nodeStats.nodeid;
+ case Age:
+ return GUIUtil::FormatPeerAge(rec->nodeStats.m_connected);
case Address:
return QString::fromStdString(rec->nodeStats.m_addr_name);
case Direction:
@@ -96,6 +98,7 @@ QVariant PeerTableModel::data(const QModelIndex& index, int role) const
} else if (role == Qt::TextAlignmentRole) {
switch (column) {
case NetNodeId:
+ case Age:
return QVariant(Qt::AlignRight | Qt::AlignVCenter);
case Address:
return {};