mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-19 23:03:45 +01:00
Merge #8078: Disable the mempool P2P command when bloom filters disabled
3d3602fAdd RPC test for the p2p mempool command in conjunction with disabled bloomfilters (Jonas Schnelli)beceac9Disable the mempool P2P command when bloom filters disabled (Peter Todd)
This commit is contained in:
@@ -5319,6 +5319,13 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
|
||||
|
||||
else if (strCommand == NetMsgType::MEMPOOL)
|
||||
{
|
||||
if (!(nLocalServices & NODE_BLOOM) && !pfrom->fWhitelisted)
|
||||
{
|
||||
LogPrint("net", "mempool request with bloom filters disabled, disconnect peer=%d\n", pfrom->GetId());
|
||||
pfrom->fDisconnect = true;
|
||||
return true;
|
||||
}
|
||||
|
||||
if (CNode::OutboundTargetReached(false) && !pfrom->fWhitelisted)
|
||||
{
|
||||
LogPrint("net", "mempool request with bandwidth limit reached, disconnect peer=%d\n", pfrom->GetId());
|
||||
|
||||
Reference in New Issue
Block a user