btcd/btcutil/bloom
Gijs van Dam 5e69e56cb8
btcutil/bloom: align hash function count with filter capacity
In this commit, we ensure hash function parameters are consistent with
filter size to avoid unnecessary operations. A filter with no capacity
doesn't actually require any hash functions, so we can cut that loop
short.
2025-07-14 11:03:36 +02:00
..
cov_report.sh multi: deprecation gocov 2025-03-19 09:45:48 +08:00
example_test.go fix typos (#2100) 2024-03-25 09:44:25 -04:00
filter.go btcutil/bloom: align hash function count with filter capacity 2025-07-14 11:03:36 +02:00
filter_test.go btcutil/bloom: align hash function count with filter capacity 2025-07-14 11:03:36 +02:00
merkleblock.go Merge pull request #1979 from kcalvinalvin/merkle-calc-fast 2023-08-10 15:05:40 -07:00
merkleblock_test.go multi: Run gofmt on the entire repository 2023-06-21 22:31:09 +09:00
murmurhash3.go btcutil: move btcutil into new sub-module 2022-01-10 18:44:56 -08:00
murmurhash3_test.go btcutil: move btcutil into new sub-module 2022-01-10 18:44:56 -08:00
README.md btcutil: move btcutil into new sub-module 2022-01-10 18:44:56 -08:00
test_coverage.txt btcutil: move btcutil into new sub-module 2022-01-10 18:44:56 -08:00

bloom

Build Status ISC License GoDoc

Package bloom provides an API for dealing with bitcoin-specific bloom filters.

A comprehensive suite of tests is provided to ensure proper functionality. See test_coverage.txt for the gocov coverage report. Alternatively, if you are running a POSIX OS, you can run the cov_report.sh script for a real-time report.

Installation and Updating

$ go get -u github.com/btcsuite/btcd/btcutil/bloom

Examples

  • NewFilter Example
    Demonstrates how to create a new bloom filter, add a transaction hash to it, and check if the filter matches the transaction.

License

Package bloom is licensed under the copyfree ISC License.