aboutsummaryrefslogtreecommitdiff
path: root/src/qt/peertablemodel.cpp
diff options
context:
space:
mode:
authorHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2021-02-22 09:53:06 +0200
committerHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2021-03-07 16:58:11 +0200
commit5a4a15d2b4456272fd8aa080195f40a09576ae01 (patch)
tree52d1847015d41591411c0270cba8b0a2a2acc460 /src/qt/peertablemodel.cpp
parent9a9f180df0d51396fee2468681df6dd935b0248e (diff)
downloadbitcoin-5a4a15d2b4456272fd8aa080195f40a09576ae01.tar.xz
qt, refactor: Drop no longer used PeerTableModel::getRowByNodeId func
Diffstat (limited to 'src/qt/peertablemodel.cpp')
-rw-r--r--src/qt/peertablemodel.cpp19
1 files changed, 0 insertions, 19 deletions
diff --git a/src/qt/peertablemodel.cpp b/src/qt/peertablemodel.cpp
index 63bfe5f570..6c4e326011 100644
--- a/src/qt/peertablemodel.cpp
+++ b/src/qt/peertablemodel.cpp
@@ -20,13 +20,10 @@ class PeerTablePriv
public:
/** Local cache of peer information */
QList<CNodeCombinedStats> cachedNodeStats;
- /** Index of rows by node ID */
- std::map<NodeId, int> mapNodeRows;
/** Pull a full list of peers from vNodes into our cache */
void refreshPeers(interfaces::Node& node)
{
- {
cachedNodeStats.clear();
interfaces::Node::NodesStats nodes_stats;
@@ -40,13 +37,6 @@ public:
stats.nodeStateStats = std::get<2>(node_stats);
cachedNodeStats.append(stats);
}
- }
-
- // build index map
- mapNodeRows.clear();
- int row = 0;
- for (const CNodeCombinedStats& stats : cachedNodeStats)
- mapNodeRows.insert(std::pair<NodeId, int>(stats.nodeStats.nodeid, row++));
}
int size() const
@@ -198,12 +188,3 @@ void PeerTableModel::refresh()
priv->refreshPeers(m_node);
Q_EMIT layoutChanged();
}
-
-int PeerTableModel::getRowByNodeId(NodeId nodeid)
-{
- std::map<NodeId, int>::iterator it = priv->mapNodeRows.find(nodeid);
- if (it == priv->mapNodeRows.end())
- return -1;
-
- return it->second;
-}