mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-03-05 14:06:27 -05: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
1 changed files with 5 additions and 3 deletions
|
@ -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…
Add table
Reference in a new issue