Merge real blockchain changes #7

Merged
jackrobison merged 2014 commits from real2 into master 2016-06-29 22:49:15 +02:00
Showing only changes of commit ae037b707c - Show all commits

View file

@ -811,6 +811,13 @@ static void AcceptConnection(const ListenSocket& hListenSocket) {
return;
}
if (CNode::IsBanned(addr) && !whitelisted)
{
LogPrintf("connection from %s dropped (banned)\n", addr.ToString());
CloseSocket(hSocket);
return;
}
if (nInbound >= nMaxInbound)
{
LogPrint("net", "connection from %s dropped (full)\n", addr.ToString());
@ -825,13 +832,6 @@ static void AcceptConnection(const ListenSocket& hListenSocket) {
return;
}
if (CNode::IsBanned(addr) && !whitelisted)
{
LogPrintf("connection from %s dropped (banned)\n", addr.ToString());
CloseSocket(hSocket);
return;
}
CNode* pnode = new CNode(hSocket, addr, "", true);
pnode->AddRef();
pnode->fWhitelisted = whitelisted;