diff --git a/src/main.cpp b/src/main.cpp index 92666d851..766369344 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -5499,8 +5499,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv, else if (!(nLocalServices & NODE_BLOOM) && (strCommand == "filterload" || - strCommand == "filteradd" || - strCommand == "filterclear")) + strCommand == "filteradd")) { if (pfrom->nVersion >= NO_BLOOM_VERSION) { Misbehaving(pfrom->GetId(), 100); @@ -5554,8 +5553,10 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv, else if (strCommand == "filterclear") { LOCK(pfrom->cs_filter); - delete pfrom->pfilter; - pfrom->pfilter = new CBloomFilter(); + if (nLocalServices & NODE_BLOOM) { + delete pfrom->pfilter; + pfrom->pfilter = new CBloomFilter(); + } pfrom->fRelayTxes = true; }