diff options
author | Sebastian Falbesoner <sebastian.falbesoner@gmail.com> | 2020-04-06 17:34:07 +0200 |
---|---|---|
committer | Sebastian Falbesoner <sebastian.falbesoner@gmail.com> | 2020-04-09 11:26:24 +0200 |
commit | 5eae034996b340c19cebab9efb6c89d20fe051ef (patch) | |
tree | 5a941edaa3b8fee4b513ca117b199057731c2799 /src/net_processing.cpp | |
parent | 661bd5dea3d080cd79f15c7703fc6ab577a1aa0c (diff) | |
download | bitcoin-5eae034996b340c19cebab9efb6c89d20fe051ef.tar.xz |
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.
Diffstat (limited to 'src/net_processing.cpp')
-rw-r--r-- | src/net_processing.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/net_processing.cpp b/src/net_processing.cpp index f63d048aac..57edf9e2a9 100644 --- a/src/net_processing.cpp +++ b/src/net_processing.cpp @@ -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; |