Move bloom filter filtering logic back into command "switch"

This commit is contained in:
Jack Grigg 2018-04-04 12:19:30 +01:00
parent 0a284ecaf6
commit 2b7fcab8fc
No known key found for this signature in database
GPG Key ID: 665DBCD284F7DAFF
1 changed files with 15 additions and 15 deletions

View File

@ -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;