diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2016-06-08 12:56:13 +0200 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2016-06-08 12:56:48 +0200 |
commit | 2156fa23b8ac95283a8b11432607aaffaabd2953 (patch) | |
tree | 7277d652a34e081292e54512fe79a57b4a10e386 /src/main.cpp | |
parent | 0f24eaf253abe7d1479777ef10f8f4e8eeb9d06e (diff) | |
parent | 3d3602faf4a47855be264f05d9d52253e8bd0f9d (diff) |
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.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp index bf6e6d04b5..80c7754998 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()); |