aboutsummaryrefslogtreecommitdiff
path: root/src/net.cpp
diff options
context:
space:
mode:
authorinstagibbs <gsanders87@gmail.com>2016-06-10 10:09:06 -0400
committerinstagibbs <gsanders87@gmail.com>2016-06-10 10:09:06 -0400
commit657fc19d6535b33748dafcf63cc0248c6fa0ee7a (patch)
tree197d5a6382ff6a69b608d17f00a09e8926c90689 /src/net.cpp
parent3e4cf8fe26440cae179aaca44ccadd476b464994 (diff)
downloadbitcoin-657fc19d6535b33748dafcf63cc0248c6fa0ee7a.tar.xz
rename mapAddrCount to mapNetGroupNodes
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 173eba57c8..c29dc3032a 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -911,11 +911,11 @@ static bool AttemptToEvictConnection(bool fPreferNewConnection) {
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;
@@ -925,7 +925,7 @@ static bool AttemptToEvictConnection(bool fPreferNewConnection) {
}
// Reduce to the network group with the most connections
- vEvictionCandidates = std::move(mapAddrCounts[naMostConnections]);
+ vEvictionCandidates = std::move(mapNetGroupNodes[naMostConnections]);
// Do not disconnect peers if there is only one unprotected connection from their network group.
// This step excessively favors netgroup diversity, and should be removed once more protective criteria are established.