diff options
| author | Wladimir J. van der Laan <[email protected]> | 2015-04-01 16:15:38 +0200 |
|---|---|---|
| committer | Wladimir J. van der Laan <[email protected]> | 2015-04-01 16:17:13 +0200 |
| commit | f7dea1cba78454f55fa0eb379737cd5c8a26237a (patch) | |
| tree | 7e2a5911e891300053c92be46248b0010daffd96 /src/net.cpp | |
| parent | Merge pull request #5950 (diff) | |
| parent | Scale up addrman (diff) | |
| download | discoin-f7dea1cba78454f55fa0eb379737cd5c8a26237a.tar.xz discoin-f7dea1cba78454f55fa0eb379737cd5c8a26237a.zip | |
Merge pull request #5941
1d21ba2 Scale up addrman (Pieter Wuille)
c6a63ce Always use a 50% chance to choose between tried and new entries (Pieter Wuille)
f68ba3f Do not bias outgoing connections towards fresh addresses (Pieter Wuille)
a8ff7c6 Simplify hashing code (Pieter Wuille)
e6b343d Make addrman's bucket placement deterministic. (Pieter Wuille)
b23add5 Switch addrman key from vector to uint256 (Pieter Wuille)
Diffstat (limited to 'src/net.cpp')
| -rw-r--r-- | src/net.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/net.cpp b/src/net.cpp index 11c2cd07d..48e6367f2 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -1221,8 +1221,7 @@ void ThreadOpenConnections() int nTries = 0; while (true) { - // use an nUnkBias between 10 (no outgoing connections) and 90 (8 outgoing connections) - CAddress addr = addrman.Select(10 + min(nOutbound,8)*10); + CAddress addr = addrman.Select(); // if we selected an invalid address, restart if (!addr.IsValid() || setConnected.count(addr.GetGroup()) || IsLocal(addr)) |