File tree Expand file tree Collapse file tree 2 files changed +0
-20
lines changed Expand file tree Collapse file tree 2 files changed +0
-20
lines changed Original file line number Diff line number Diff line change @@ -20,13 +20,10 @@ class PeerTablePriv
20
20
public:
21
21
/* * Local cache of peer information */
22
22
QList<CNodeCombinedStats> cachedNodeStats;
23
- /* * Index of rows by node ID */
24
- std::map<NodeId, int > mapNodeRows;
25
23
26
24
/* * Pull a full list of peers from vNodes into our cache */
27
25
void refreshPeers (interfaces::Node& node)
28
26
{
29
- {
30
27
cachedNodeStats.clear ();
31
28
32
29
interfaces::Node::NodesStats nodes_stats;
@@ -40,13 +37,6 @@ class PeerTablePriv
40
37
stats.nodeStateStats = std::get<2 >(node_stats);
41
38
cachedNodeStats.append (stats);
42
39
}
43
- }
44
-
45
- // build index map
46
- mapNodeRows.clear ();
47
- int row = 0 ;
48
- for (const CNodeCombinedStats& stats : cachedNodeStats)
49
- mapNodeRows.insert (std::pair<NodeId, int >(stats.nodeStats .nodeid , row++));
50
40
}
51
41
52
42
int size () const
@@ -198,12 +188,3 @@ void PeerTableModel::refresh()
198
188
priv->refreshPeers (m_node);
199
189
Q_EMIT layoutChanged ();
200
190
}
201
-
202
- int PeerTableModel::getRowByNodeId (NodeId nodeid)
203
- {
204
- std::map<NodeId, int >::iterator it = priv->mapNodeRows .find (nodeid);
205
- if (it == priv->mapNodeRows .end ())
206
- return -1 ;
207
-
208
- return it->second ;
209
- }
Original file line number Diff line number Diff line change @@ -41,7 +41,6 @@ class PeerTableModel : public QAbstractTableModel
41
41
public:
42
42
explicit PeerTableModel (interfaces::Node& node, QObject* parent);
43
43
~PeerTableModel ();
44
- int getRowByNodeId (NodeId nodeid);
45
44
void startAutoRefresh ();
46
45
void stopAutoRefresh ();
47
46
You can’t perform that action at this time.
0 commit comments