mirror of
https://github.com/dashpay/dash.git
synced 2024-12-27 04:52:59 +01:00
Merge pull request #1546 from gmaxwell/allowsamenetinbound
Do not consider inbound peers for outbound network group exclusion.
This commit is contained in:
commit
3898609304
@ -1430,16 +1430,17 @@ void ThreadOpenConnections2(void* parg)
|
||||
//
|
||||
CAddress addrConnect;
|
||||
|
||||
// Only connect to one address per a.b.?.? range.
|
||||
// Only connect out to one peer per network group (/16 for IPv4).
|
||||
// Do this here so we don't have to critsect vNodes inside mapAddresses critsect.
|
||||
int nOutbound = 0;
|
||||
set<vector<unsigned char> > setConnected;
|
||||
{
|
||||
LOCK(cs_vNodes);
|
||||
BOOST_FOREACH(CNode* pnode, vNodes) {
|
||||
setConnected.insert(pnode->addr.GetGroup());
|
||||
if (!pnode->fInbound)
|
||||
if (!pnode->fInbound) {
|
||||
setConnected.insert(pnode->addr.GetGroup());
|
||||
nOutbound++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user