mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-04-08 20:28:55 +02:00
[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
This commit is contained in:
parent
b33136b6ba
commit
1c6b787e03
@ -3490,13 +3490,15 @@ bool ProcessMessage(CNode& pfrom, const std::string& msg_type, CDataStream& vRec
|
||||
}
|
||||
|
||||
if (msg_type == NetMsgType::FILTERCLEAR) {
|
||||
if (!(pfrom.GetLocalServices() & NODE_BLOOM)) {
|
||||
pfrom.fDisconnect = true;
|
||||
return true;
|
||||
}
|
||||
if (pfrom.m_tx_relay == nullptr) {
|
||||
return true;
|
||||
}
|
||||
LOCK(pfrom.m_tx_relay->cs_filter);
|
||||
if (pfrom.GetLocalServices() & NODE_BLOOM) {
|
||||
pfrom.m_tx_relay->pfilter = nullptr;
|
||||
}
|
||||
pfrom.m_tx_relay->pfilter = nullptr;
|
||||
pfrom.m_tx_relay->fRelayTxes = true;
|
||||
return true;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user