Skip to content

Commit 657fc19

Browse files
committed
rename mapAddrCount to mapNetGroupNodes
1 parent 3e4cf8f commit 657fc19

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
@@ -911,11 +911,11 @@ static bool AttemptToEvictConnection(bool fPreferNewConnection) {
911911
uint64_t naMostConnections;
912912
unsigned int nMostConnections = 0;
913913
int64_t nMostConnectionsTime = 0;
914-
std::map<uint64_t, std::vector<NodeEvictionCandidate> > mapAddrCounts;
914+
std::map<uint64_t, std::vector<NodeEvictionCandidate> > mapNetGroupNodes;
915915
BOOST_FOREACH(const NodeEvictionCandidate &node, vEvictionCandidates) {
916-
mapAddrCounts[node.nKeyedNetGroup].push_back(node);
917-
int64_t grouptime = mapAddrCounts[node.nKeyedNetGroup][0].nTimeConnected;
918-
size_t groupsize = mapAddrCounts[node.nKeyedNetGroup].size();
916+
mapNetGroupNodes[node.nKeyedNetGroup].push_back(node);
917+
int64_t grouptime = mapNetGroupNodes[node.nKeyedNetGroup][0].nTimeConnected;
918+
size_t groupsize = mapNetGroupNodes[node.nKeyedNetGroup].size();
919919

920920
if (groupsize > nMostConnections || (groupsize == nMostConnections && grouptime > nMostConnectionsTime)) {
921921
nMostConnections = groupsize;
@@ -925,7 +925,7 @@ static bool AttemptToEvictConnection(bool fPreferNewConnection) {
925925
}
926926

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

930930
// Do not disconnect peers if there is only one unprotected connection from their network group.
931931
// This step excessively favors netgroup diversity, and should be removed once more protective criteria are established.

0 commit comments

Comments
 (0)