diff options
| author | Wladimir J. van der Laan <[email protected]> | 2015-11-26 08:32:38 +0100 |
|---|---|---|
| committer | Wladimir J. van der Laan <[email protected]> | 2015-11-26 08:43:21 +0100 |
| commit | be281d8a83ca8fe7cf785a4608d1a8954b193191 (patch) | |
| tree | 320d1fc8892f741984c68c3f4adf09454e350d4e /src/main.cpp | |
| parent | Merge pull request #7088 (diff) | |
| parent | Document both the peerbloomfilters and enforcenodebloom options. (diff) | |
| download | discoin-be281d8a83ca8fe7cf785a4608d1a8954b193191.tar.xz discoin-be281d8a83ca8fe7cf785a4608d1a8954b193191.zip | |
Merge pull request #7087
9cf6688 Document both the peerbloomfilters and enforcenodebloom options. (Patick Strateman)
0f4dc53 Add enforcenodebloom option. (Patick Strateman)
b3caa9b Move bloom filter filtering logic outside of command "switch" (giant if/else). (Patick Strateman)
Diffstat (limited to 'src/main.cpp')
| -rw-r--r-- | src/main.cpp | 28 |
1 files changed, 13 insertions, 15 deletions
diff --git a/src/main.cpp b/src/main.cpp index 2579b642b..b0b58141a 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -3989,6 +3989,19 @@ 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") @@ -4750,21 +4763,6 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv, } - else if (!(nLocalServices & NODE_BLOOM) && - (strCommand == "filterload" || - strCommand == "filteradd" || - strCommand == "filterclear") && - //TODO: Remove this line after reasonable network upgrade - pfrom->nVersion >= NO_BLOOM_VERSION) - { - if (pfrom->nVersion >= NO_BLOOM_VERSION) - Misbehaving(pfrom->GetId(), 100); - //TODO: Enable this after reasonable network upgrade - //else - // pfrom->fDisconnect = true; - } - - else if (strCommand == "filterload") { CBloomFilter filter; |