Skip to content

Commit 194110f

Browse files
committed
Merge #8189: rename mapAddrCount to mapNetGroupNodes
657fc19 rename mapAddrCount to mapNetGroupNodes (instagibbs)
2 parents ced2d5e + 657fc19 commit 194110f

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/net.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -982,11 +982,11 @@ static bool AttemptToEvictConnection() {
982982
uint64_t naMostConnections;
983983
unsigned int nMostConnections = 0;
984984
int64_t nMostConnectionsTime = 0;
985-
std::map<uint64_t, std::vector<NodeEvictionCandidate> > mapAddrCounts;
985+
std::map<uint64_t, std::vector<NodeEvictionCandidate> > mapNetGroupNodes;
986986
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();
990990

991991
if (groupsize > nMostConnections || (groupsize == nMostConnections && grouptime > nMostConnectionsTime)) {
992992
nMostConnections = groupsize;
@@ -996,7 +996,7 @@ static bool AttemptToEvictConnection() {
996996
}
997997

998998
// Reduce to the network group with the most connections
999-
vEvictionCandidates = std::move(mapAddrCounts[naMostConnections]);
999+
vEvictionCandidates = std::move(mapNetGroupNodes[naMostConnections]);
10001000

10011001
// Disconnect from the network group with the most connections
10021002
NodeId evicted = vEvictionCandidates.front().id;

0 commit comments

Comments
 (0)