aboutsummaryrefslogtreecommitdiff
path: root/src/net.cpp
diff options
context:
space:
mode:
authorGregory Maxwell <greg@xiph.org>2015-04-19 13:39:38 -0700
committerGregory Maxwell <greg@xiph.org>2016-05-26 12:56:32 +0000
commit6182d10503ae3af222a7e4575724dce7ef563fec (patch)
tree1d3eb65c41fee943ae7c2cfcc8873188a1ffaab7 /src/net.cpp
parentc769c4af11fc58dd4813d328c7f71042bc577676 (diff)
downloadbitcoin-6182d10503ae3af222a7e4575724dce7ef563fec.tar.xz
Do not increment nAttempts by more than one for every Good connection.
This slows the increase of the nAttempts in addrman while partitioned, even if the node hasn't yet noticed the partitioning.
Diffstat (limited to 'src/net.cpp')
-rw-r--r--src/net.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/net.cpp b/src/net.cpp
index f30321869a..c15a4692e1 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -1633,7 +1633,7 @@ void ThreadOpenConnections()
}
if (addrConnect.IsValid())
- OpenNetworkConnection(addrConnect, (int)setConnected.size() >= min(nMaxConnections - 1, 2), &grant);
+ OpenNetworkConnection(addrConnect, (int)setConnected.size() >= std::min(nMaxConnections - 1, 2), &grant);
}
}