mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-05-14 05:40:41 +02:00
Do not disconnect peer for asking mempool if it has NO_BAN permission
This commit is contained in:
parent
e5b26deaaa
commit
ecd5cf7ea4
@ -3012,15 +3012,21 @@ bool static ProcessMessage(CNode* pfrom, const std::string& strCommand, CDataStr
|
|||||||
if (strCommand == NetMsgType::MEMPOOL) {
|
if (strCommand == NetMsgType::MEMPOOL) {
|
||||||
if (!(pfrom->GetLocalServices() & NODE_BLOOM) && !pfrom->fWhitelisted)
|
if (!(pfrom->GetLocalServices() & NODE_BLOOM) && !pfrom->fWhitelisted)
|
||||||
{
|
{
|
||||||
LogPrint(BCLog::NET, "mempool request with bloom filters disabled, disconnect peer=%d\n", pfrom->GetId());
|
if (!pfrom->HasPermission(PF_NOBAN))
|
||||||
pfrom->fDisconnect = true;
|
{
|
||||||
|
LogPrint(BCLog::NET, "mempool request with bloom filters disabled, disconnect peer=%d\n", pfrom->GetId());
|
||||||
|
pfrom->fDisconnect = true;
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (connman->OutboundTargetReached(false) && !pfrom->fWhitelisted)
|
if (connman->OutboundTargetReached(false) && !pfrom->fWhitelisted)
|
||||||
{
|
{
|
||||||
LogPrint(BCLog::NET, "mempool request with bandwidth limit reached, disconnect peer=%d\n", pfrom->GetId());
|
if (!pfrom->HasPermission(PF_NOBAN))
|
||||||
pfrom->fDisconnect = true;
|
{
|
||||||
|
LogPrint(BCLog::NET, "mempool request with bandwidth limit reached, disconnect peer=%d\n", pfrom->GetId());
|
||||||
|
pfrom->fDisconnect = true;
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user