aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <[email protected]>2016-06-08 12:56:13 +0200
committerWladimir J. van der Laan <[email protected]>2016-06-08 12:56:48 +0200
commit2156fa23b8ac95283a8b11432607aaffaabd2953 (patch)
tree7277d652a34e081292e54512fe79a57b4a10e386 /src/main.cpp
parentMerge #8164: [Bitcoin-Tx] fix missing test fixtures, fix 32bit atoi issue (diff)
parentAdd RPC test for the p2p mempool command in conjunction with disabled bloomfi... (diff)
downloaddiscoin-2156fa23b8ac95283a8b11432607aaffaabd2953.tar.xz
discoin-2156fa23b8ac95283a8b11432607aaffaabd2953.zip
Merge #8078: Disable the mempool P2P command when bloom filters disabled
3d3602f Add RPC test for the p2p mempool command in conjunction with disabled bloomfilters (Jonas Schnelli) beceac9 Disable the mempool P2P command when bloom filters disabled (Peter Todd)
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp
index bf6e6d04b..80c775499 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -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());