Merge pull request #7166

6aadc75 Disconnect on mempool requests from peers when over the upload limit. (Gregory Maxwell)
This commit is contained in:
Wladimir J. van der Laan 2015-12-04 09:43:04 +01:00 committed by Alexander Block
parent cef919f182
commit 1086851938

View File

@ -2093,6 +2093,13 @@ bool static ProcessMessage(CNode* pfrom, const std::string& strCommand, CDataStr
return true;
}
if (connman.OutboundTargetReached(false) && !pfrom->fWhitelisted)
{
LogPrint("net", "mempool request with bandwidth limit reached, disconnect peer=%d\n", pfrom->GetId());
pfrom->fDisconnect = true;
return true;
}
LOCK(pfrom->cs_inventory);
pfrom->fSendMempool = true;
}