File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -982,11 +982,11 @@ static bool AttemptToEvictConnection() {
982
982
uint64_t naMostConnections;
983
983
unsigned int nMostConnections = 0 ;
984
984
int64_t nMostConnectionsTime = 0 ;
985
- std::map<uint64_t , std::vector<NodeEvictionCandidate> > mapAddrCounts ;
985
+ std::map<uint64_t , std::vector<NodeEvictionCandidate> > mapNetGroupNodes ;
986
986
BOOST_FOREACH (const NodeEvictionCandidate &node, vEvictionCandidates) {
987
- mapAddrCounts [node.nKeyedNetGroup ].push_back (node);
988
- int64_t grouptime = mapAddrCounts [node.nKeyedNetGroup ][0 ].nTimeConnected ;
989
- size_t groupsize = mapAddrCounts [node.nKeyedNetGroup ].size ();
987
+ mapNetGroupNodes [node.nKeyedNetGroup ].push_back (node);
988
+ int64_t grouptime = mapNetGroupNodes [node.nKeyedNetGroup ][0 ].nTimeConnected ;
989
+ size_t groupsize = mapNetGroupNodes [node.nKeyedNetGroup ].size ();
990
990
991
991
if (groupsize > nMostConnections || (groupsize == nMostConnections && grouptime > nMostConnectionsTime)) {
992
992
nMostConnections = groupsize;
@@ -996,7 +996,7 @@ static bool AttemptToEvictConnection() {
996
996
}
997
997
998
998
// Reduce to the network group with the most connections
999
- vEvictionCandidates = std::move (mapAddrCounts [naMostConnections]);
999
+ vEvictionCandidates = std::move (mapNetGroupNodes [naMostConnections]);
1000
1000
1001
1001
// Disconnect from the network group with the most connections
1002
1002
NodeId evicted = vEvictionCandidates.front ().id ;
You can’t perform that action at this time.
0 commit comments