Merge pull request #7166
6aadc75 Disconnect on mempool requests from peers when over the upload limit. (Gregory Maxwell)
This commit is contained in:
parent
cef919f182
commit
1086851938
@ -2093,6 +2093,13 @@ bool static ProcessMessage(CNode* pfrom, const std::string& strCommand, CDataStr
|
|||||||
return true;
|
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);
|
LOCK(pfrom->cs_inventory);
|
||||||
pfrom->fSendMempool = true;
|
pfrom->fSendMempool = true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user