Module merkle_tree
Expand description
Bitcoin merkle tree functions.
§Examples
let tx_hashes = vec![tx1, tx2]; // All the hashes we wish to merkelize.
let root = merkle_tree::calculate_root(tx_hashes.into_iter());
Structs§
- Merkle
Block - Data structure that represents a block header paired to a partial merkle tree.
- Partial
Merkle Tree - Data structure that represents a partial merkle tree.
Enums§
- Merkle
Block Error - An error when verifying the merkle block.
Functions§
- calculate_
root - Calculates the merkle root of an iterator of hashes.
- calculate_
root_ inline - Calculates the merkle root of a list of hashes, inline (in place) in
hashes
.