Skip to content

Commit 1e50d22

Browse files
committed
Merge #8709: Allow filterclear messages for enabling TX relay only.
1f951c6 Allow filterclear messages for enabling TX relay only. (R E Broadley)
2 parents c113a65 + 1f951c6 commit 1e50d22

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/main.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5048,8 +5048,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
50485048

50495049
if (!(pfrom->GetLocalServices() & NODE_BLOOM) &&
50505050
(strCommand == NetMsgType::FILTERLOAD ||
5051-
strCommand == NetMsgType::FILTERADD ||
5052-
strCommand == NetMsgType::FILTERCLEAR))
5051+
strCommand == NetMsgType::FILTERADD))
50535052
{
50545053
if (pfrom->nVersion >= NO_BLOOM_VERSION) {
50555054
LOCK(cs_main);
@@ -6275,8 +6274,10 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
62756274
else if (strCommand == NetMsgType::FILTERCLEAR)
62766275
{
62776276
LOCK(pfrom->cs_filter);
6278-
delete pfrom->pfilter;
6279-
pfrom->pfilter = new CBloomFilter();
6277+
if (pfrom->GetLocalServices() & NODE_BLOOM) {
6278+
delete pfrom->pfilter;
6279+
pfrom->pfilter = new CBloomFilter();
6280+
}
62806281
pfrom->fRelayTxes = true;
62816282
}
62826283

0 commit comments

Comments
 (0)