mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-14 12:43:40 +02:00
net: limit BIP37 filter lifespan (active between 'filterload' and 'filterclear')
Previously, a default match-everything bloom filter was set for every peer, i.e. even before receiving a 'filterload' message and after receiving a 'filterclear' message code branches checking for the existence of the filter by testing the pointer "pfilter" were _always_ executed.
This commit is contained in:
parent
661bd5dea3
commit
5eae034996
2 changed files with 2 additions and 3 deletions
|
|
@ -3198,7 +3198,7 @@ bool ProcessMessage(CNode* pfrom, const std::string& msg_type, CDataStream& vRec
|
|||
}
|
||||
LOCK(pfrom->m_tx_relay->cs_filter);
|
||||
if (pfrom->GetLocalServices() & NODE_BLOOM) {
|
||||
pfrom->m_tx_relay->pfilter.reset(new CBloomFilter());
|
||||
pfrom->m_tx_relay->pfilter = nullptr;
|
||||
}
|
||||
pfrom->m_tx_relay->fRelayTxes = true;
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue