Skip to content

Commit 9be5928

Browse files
laanwjcodablock
authored andcommitted
Merge bitcoin#8709: Allow filterclear messages for enabling TX relay only.
1f951c6 Allow filterclear messages for enabling TX relay only. (R E Broadley)
1 parent 84559c0 commit 9be5928

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/net_processing.cpp

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

11111111
if (!(pfrom->GetLocalServices() & NODE_BLOOM) &&
11121112
(strCommand == NetMsgType::FILTERLOAD ||
1113-
strCommand == NetMsgType::FILTERADD ||
1114-
strCommand == NetMsgType::FILTERCLEAR))
1113+
strCommand == NetMsgType::FILTERADD))
11151114
{
11161115
if (pfrom->nVersion >= NO_BLOOM_VERSION) {
11171116
LOCK(cs_main);
@@ -2204,8 +2203,10 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
22042203
else if (strCommand == NetMsgType::FILTERCLEAR)
22052204
{
22062205
LOCK(pfrom->cs_filter);
2207-
delete pfrom->pfilter;
2208-
pfrom->pfilter = new CBloomFilter();
2206+
if (pfrom->GetLocalServices() & NODE_BLOOM) {
2207+
delete pfrom->pfilter;
2208+
pfrom->pfilter = new CBloomFilter();
2209+
}
22092210
pfrom->fRelayTxes = true;
22102211
}
22112212

0 commit comments

Comments
 (0)