From 2b7fcab8fc3205c49224a25ed108a6a2d05c63ed Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Wed, 4 Apr 2018 12:19:30 +0100 Subject: [PATCH] Move bloom filter filtering logic back into command "switch" --- src/main.cpp | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index a892ff0d3..92666d851 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -4721,21 +4721,6 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv, } - if (!(nLocalServices & NODE_BLOOM) && - (strCommand == "filterload" || - strCommand == "filteradd" || - strCommand == "filterclear")) - { - if (pfrom->nVersion >= NO_BLOOM_VERSION) { - Misbehaving(pfrom->GetId(), 100); - return false; - } else if (GetBoolArg("-enforcenodebloom", false)) { - pfrom->fDisconnect = true; - return false; - } - } - - if (strCommand == "version") { // Each connection can only send one version message @@ -5512,6 +5497,21 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv, } + else if (!(nLocalServices & NODE_BLOOM) && + (strCommand == "filterload" || + strCommand == "filteradd" || + strCommand == "filterclear")) + { + if (pfrom->nVersion >= NO_BLOOM_VERSION) { + Misbehaving(pfrom->GetId(), 100); + return false; + } else if (GetBoolArg("-enforcenodebloom", false)) { + pfrom->fDisconnect = true; + return false; + } + } + + else if (strCommand == "filterload") { CBloomFilter filter;