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
2020public:
2121 /* * Local cache of peer information */
2222 QList<CNodeCombinedStats> cachedNodeStats;
23- /* * Index of rows by node ID */
24- std::map<NodeId, int > mapNodeRows;
2523
2624 /* * Pull a full list of peers from vNodes into our cache */
2725 void refreshPeers (interfaces::Node& node)
2826 {
29- {
3027 cachedNodeStats.clear ();
3128
3229 interfaces::Node::NodesStats nodes_stats;
@@ -40,13 +37,6 @@ class PeerTablePriv
4037 stats.nodeStateStats = std::get<2 >(node_stats);
4138 cachedNodeStats.append (stats);
4239 }
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++));
5040 }
5141
5242 int size () const
@@ -193,12 +183,3 @@ void PeerTableModel::refresh()
193183 priv->refreshPeers (m_node);
194184 Q_EMIT layoutChanged ();
195185}
196-
197- int PeerTableModel::getRowByNodeId (NodeId nodeid)
198- {
199- std::map<NodeId, int >::iterator it = priv->mapNodeRows .find (nodeid);
200- if (it == priv->mapNodeRows .end ())
201- return -1 ;
202-
203- return it->second ;
204- }
Original file line number Diff line number Diff line change @@ -41,7 +41,6 @@ class PeerTableModel : public QAbstractTableModel
4141public:
4242 explicit PeerTableModel (interfaces::Node& node, QObject* parent);
4343 ~PeerTableModel ();
44- int getRowByNodeId (NodeId nodeid);
4544 void startAutoRefresh ();
4645 void stopAutoRefresh ();
4746
You can’t perform that action at this time.
0 commit comments