Skip to content

Commit 1c6b787

Browse files
committed
[netprocessing] disconnect node that sends filterclear
-nodes not serving bloomfilters should disconnect peers that send filterclear, just like filteradd and filterload -nodes that want to enable/disable txrelay should use feefilter
1 parent b33136b commit 1c6b787

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/net_processing.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3490,13 +3490,15 @@ bool ProcessMessage(CNode& pfrom, const std::string& msg_type, CDataStream& vRec
34903490
}
34913491

34923492
if (msg_type == NetMsgType::FILTERCLEAR) {
3493+
if (!(pfrom.GetLocalServices() & NODE_BLOOM)) {
3494+
pfrom.fDisconnect = true;
3495+
return true;
3496+
}
34933497
if (pfrom.m_tx_relay == nullptr) {
34943498
return true;
34953499
}
34963500
LOCK(pfrom.m_tx_relay->cs_filter);
3497-
if (pfrom.GetLocalServices() & NODE_BLOOM) {
3498-
pfrom.m_tx_relay->pfilter = nullptr;
3499-
}
3501+
pfrom.m_tx_relay->pfilter = nullptr;
35003502
pfrom.m_tx_relay->fRelayTxes = true;
35013503
return true;
35023504
}

0 commit comments

Comments
 (0)