mirror of
https://github.com/kvazar-network/kevacoin.git
synced 2025-01-30 16:54:19 +00:00
Disable the mempool P2P command when bloom filters disabled
Only useful to SPV peers, and attackers... like bloom is a DoS vector as far more data is sent than received.
This commit is contained in:
parent
8844ef15de
commit
beceac9bbf
@ -5277,6 +5277,13 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
|
|||||||
|
|
||||||
else if (strCommand == NetMsgType::MEMPOOL)
|
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)
|
if (CNode::OutboundTargetReached(false) && !pfrom->fWhitelisted)
|
||||||
{
|
{
|
||||||
LogPrint("net", "mempool request with bandwidth limit reached, disconnect peer=%d\n", pfrom->GetId());
|
LogPrint("net", "mempool request with bandwidth limit reached, disconnect peer=%d\n", pfrom->GetId());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user