22c91fa80a
This updates all code in the main package and subpackages to make use of the new chainhash package since the old wire.ShaHash type and functions have been removed in favor of the abstracted package. Also, since this required API changes anyways and the hash algorithm is no longer tied specifically to SHA, all other functions throughout the code base which had "Sha" in their name have been changed to Hash so they are not incorrectly implying the hash algorithm. The following is an overview of the changes: - Update all references to wire.ShaHash to the new chainhash.Hash type - Rename the following functions and update all references: - Block.Sha -> Hash - Block.TxSha -> TxHash - Tx.Sha -> Hash - bloom.Filter.AddShaHash -> AddHash - Rename all variables that included sha in their name to include hash instead - Add license headers to coinset package files |
||
---|---|---|
.. | ||
cov_report.sh | ||
example_test.go | ||
filter.go | ||
filter_test.go | ||
merkleblock.go | ||
merkleblock_test.go | ||
murmurhash3.go | ||
murmurhash3_test.go | ||
README.md | ||
test_coverage.txt |
bloom
[] (https://travis-ci.org/btcsuite/btcutil) ![ISC License] (http://img.shields.io/badge/license-ISC-blue.svg) [] (http://godoc.org/github.com/btcsuite/btcutil/bloom)
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/btcutil/bloom
Examples
- [NewFilter Example]
(http://godoc.org/github.com/btcsuite/btcutil/bloom#example-NewFilter)
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.