Move bloom filter filtering logic back into command "switch"
This commit is contained in:
parent
0a284ecaf6
commit
2b7fcab8fc
30
src/main.cpp
30
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;
|
||||
|
|
Loading…
Reference in New Issue