mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 06:58:57 +01:00
Merge pull request #5941
1d21ba2Scale up addrman (Pieter Wuille)c6a63ceAlways use a 50% chance to choose between tried and new entries (Pieter Wuille)f68ba3fDo not bias outgoing connections towards fresh addresses (Pieter Wuille)a8ff7c6Simplify hashing code (Pieter Wuille)e6b343dMake addrman's bucket placement deterministic. (Pieter Wuille)b23add5Switch addrman key from vector to uint256 (Pieter Wuille)
This commit is contained in:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user