Move bloom filter filtering logic back into command "switch"
This commit is contained in:
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")
|
if (strCommand == "version")
|
||||||
{
|
{
|
||||||
// Each connection can only send one version message
|
// 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")
|
else if (strCommand == "filterload")
|
||||||
{
|
{
|
||||||
CBloomFilter filter;
|
CBloomFilter filter;
|
||||||
|
|||||||
Reference in New Issue
Block a user