aboutsummaryrefslogtreecommitdiff
path: root/src/qt/peertablemodel.cpp
diff options
context:
space:
mode:
authorCory Fields <cory-nospam-@coryfields.com>2016-08-19 15:38:04 -0400
committerCory Fields <cory-nospam-@coryfields.com>2016-09-08 12:03:22 -0400
commit531214fb100c14e62921085cd68cabe2b20ee0eb (patch)
treee670b843a76489a8928a24795cb624e159da9dfb /src/qt/peertablemodel.cpp
parentddc308068d69c6c9aa629ee3c4ce75e1d1cf08b5 (diff)
downloadbitcoin-531214fb100c14e62921085cd68cabe2b20ee0eb.tar.xz
gui: add NodeID to the peer table
Diffstat (limited to 'src/qt/peertablemodel.cpp')
-rw-r--r--src/qt/peertablemodel.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/qt/peertablemodel.cpp b/src/qt/peertablemodel.cpp
index 84ad0052fd..0eb28f4ae1 100644
--- a/src/qt/peertablemodel.cpp
+++ b/src/qt/peertablemodel.cpp
@@ -24,6 +24,8 @@ bool NodeLessThan::operator()(const CNodeCombinedStats &left, const CNodeCombine
switch(column)
{
+ case PeerTableModel::NetNodeId:
+ return pLeft->nodeid < pRight->nodeid;
case PeerTableModel::Address:
return pLeft->addrName.compare(pRight->addrName) < 0;
case PeerTableModel::Subversion:
@@ -114,7 +116,7 @@ PeerTableModel::PeerTableModel(ClientModel *parent) :
clientModel(parent),
timer(0)
{
- columns << tr("Node/Service") << tr("User Agent") << tr("Ping Time");
+ columns << tr("NodeId") << tr("Node/Service") << tr("User Agent") << tr("Ping Time");
priv = new PeerTablePriv();
// default to unsorted
priv->sortColumn = -1;
@@ -160,6 +162,8 @@ QVariant PeerTableModel::data(const QModelIndex &index, int role) const
if (role == Qt::DisplayRole) {
switch(index.column())
{
+ case NetNodeId:
+ return rec->nodeStats.nodeid;
case Address:
return QString::fromStdString(rec->nodeStats.addrName);
case Subversion: