mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-10 20:03:34 -03:00
Do not disconnect peer for asking mempool if it has NO_BAN permission
This commit is contained in:
parent
e5b26deaaa
commit
ecd5cf7ea4
1 changed files with 10 additions and 4 deletions
|
@ -3011,16 +3011,22 @@ bool static ProcessMessage(CNode* pfrom, const std::string& strCommand, CDataStr
|
|||
|
||||
if (strCommand == NetMsgType::MEMPOOL) {
|
||||
if (!(pfrom->GetLocalServices() & NODE_BLOOM) && !pfrom->fWhitelisted)
|
||||
{
|
||||
if (!pfrom->HasPermission(PF_NOBAN))
|
||||
{
|
||||
LogPrint(BCLog::NET, "mempool request with bloom filters disabled, disconnect peer=%d\n", pfrom->GetId());
|
||||
pfrom->fDisconnect = true;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
if (connman->OutboundTargetReached(false) && !pfrom->fWhitelisted)
|
||||
{
|
||||
if (!pfrom->HasPermission(PF_NOBAN))
|
||||
{
|
||||
LogPrint(BCLog::NET, "mempool request with bandwidth limit reached, disconnect peer=%d\n", pfrom->GetId());
|
||||
pfrom->fDisconnect = true;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue