Sparse Merkle tree
A sparse Merkle tree implementation that only recomputes its branches’ hashes when asked.
Example
use ;
let foo = hash;
let bar = hash;
let baz = hash;
let mut tree = new;
tree.insert;
tree.insert;
tree.insert;
assert_eq!;
let root = tree.flush;
assert_eq!;
assert_eq!;
let proof = tree.proove.unwrap;
assert_eq!;
let encoded = proof.as_bytes;
let decoded = from_bytes.unwrap;
assert_eq!;
tree.remove;
let root = tree.flush;
assert_eq!;
License
This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.