aboutsummaryrefslogtreecommitdiff
path: root/src/net.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2016-08-03 11:50:10 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2016-08-03 11:50:45 +0200
commit194110fb911db06eaee3098651a6eea085105e0a (patch)
tree8d2418904a4bd233d4c61bfb0652061f4d2cbdfd /src/net.cpp
parentced2d5ef7c3bc53edccef669ec5105627b482e2f (diff)
parent657fc19d6535b33748dafcf63cc0248c6fa0ee7a (diff)
downloadbitcoin-194110fb911db06eaee3098651a6eea085105e0a.tar.xz
Merge #8189: rename mapAddrCount to mapNetGroupNodes
657fc19 rename mapAddrCount to mapNetGroupNodes (instagibbs)
Diffstat (limited to 'src/net.cpp')
-rw-r--r--src/net.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/net.cpp b/src/net.cpp
index 4cbc43e4d8..4a7fa2228a 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -982,11 +982,11 @@ static bool AttemptToEvictConnection() {
uint64_t naMostConnections;
unsigned int nMostConnections = 0;
int64_t nMostConnectionsTime = 0;
- std::map<uint64_t, std::vector<NodeEvictionCandidate> > mapAddrCounts;
+ std::map<uint64_t, std::vector<NodeEvictionCandidate> > mapNetGroupNodes;
BOOST_FOREACH(const NodeEvictionCandidate &node, vEvictionCandidates) {
- mapAddrCounts[node.nKeyedNetGroup].push_back(node);
- int64_t grouptime = mapAddrCounts[node.nKeyedNetGroup][0].nTimeConnected;
- size_t groupsize = mapAddrCounts[node.nKeyedNetGroup].size();
+ mapNetGroupNodes[node.nKeyedNetGroup].push_back(node);
+ int64_t grouptime = mapNetGroupNodes[node.nKeyedNetGroup][0].nTimeConnected;
+ size_t groupsize = mapNetGroupNodes[node.nKeyedNetGroup].size();
if (groupsize > nMostConnections || (groupsize == nMostConnections && grouptime > nMostConnectionsTime)) {
nMostConnections = groupsize;
@@ -996,7 +996,7 @@ static bool AttemptToEvictConnection() {
}
// Reduce to the network group with the most connections
- vEvictionCandidates = std::move(mapAddrCounts[naMostConnections]);
+ vEvictionCandidates = std::move(mapNetGroupNodes[naMostConnections]);
// Disconnect from the network group with the most connections
NodeId evicted = vEvictionCandidates.front().id;