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
This commit modifies the NewMerkleBlock function to return the matched
transaction indices instead of their hashes. This is being done because
it is much easier for the caller to lookup the matched transactions from
the original passed block based on their transaction index within the
block versus their hashes.
This commit finishes the work started by @dajohi on bloom filters.
- Rename the package from bloomfilter to bloom
- Rename New function to NewFiler
- Rename Load function to LoadFilter
- Rename BloomFilter type to Filter
- Rename Contains to Matches
- Correct tx match handling to match all inputs and outputs instead of
only the first one
- Optimize murmur hash function by using constants
- Optimize the merkle block creation and reduce num of memory allocations
required
- Make MsgFilterLoad concurrent safe as intended
- Update various code consistency issues
- Add a lot of comments
- Improve tests
- Make the code golint clean