[#CBloomFilter]
= CBloomFilter
:mrdocs:

BloomFilter is a probabilistic filter which SPV clients provide so that we can filter the transactions we send them&period;

== Synopsis

Declared in `&lt;common&sol;bloom&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
class CBloomFilter;
----

== Description

This allows for significantly more efficient transaction and block downloads&period;

Because bloom filters are probabilistic, a SPV node can increase the false&hyphen; positive rate, making us send it transactions which aren&apos;t actually its, allowing clients to trade more bandwidth for more privacy by obfuscating which keys are controlled by them&period;

== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:CBloomFilter/2constructor-0b.adoc[`CBloomFilter`]         [.small]#[constructor]#
| Constructors
| xref:CBloomFilter/IsRelevantAndUpdate.adoc[`IsRelevantAndUpdate`] 
| Also adds any outputs which match the filter to the filter (to match their spending txes)
| xref:CBloomFilter/IsWithinSizeConstraints.adoc[`IsWithinSizeConstraints`] 
| True if the size is &lt;&equals; MAX&lowbar;BLOOM&lowbar;FILTER&lowbar;SIZE and the number of hash functions is &lt;&equals; MAX&lowbar;HASH&lowbar;FUNCS (catch a filter which was just deserialized which was too big)
| xref:CBloomFilter/contains-0e.adoc[`contains`] 
| `contains` overloads
| xref:CBloomFilter/insert-0d.adoc[`insert`] 
| `insert` overloads
|===



[.small]#Created with https://www.mrdocs.com[MrDocs]#
