mirror of https://github.com/zcash/orchard.git
Apply suggestions from code review
Co-authored-by: str4d <thestr4d@gmail.com>
This commit is contained in:
parent
1cf828fe7b
commit
273662c00b
|
@ -9,4 +9,4 @@ and this project adheres to Rust's notion of
|
|||
Initial release!
|
||||
|
||||
## [Removed]
|
||||
- The `std::hash::Hash` instance for `MerkleHashOrchard` has been removed.
|
||||
- `impl std::hash::Hash for MerkleHashOrchard` (use `BTreeMap` instead of `HashMap`).
|
||||
|
|
|
@ -672,9 +672,9 @@ pub mod testing {
|
|||
for note in notes.iter() {
|
||||
let leaf = MerkleHashOrchard::from_cmx(¬e.commitment().into());
|
||||
tree.append(&leaf);
|
||||
let (position, leaf) = tree.witness().unwrap();
|
||||
let (position, leaf) = tree.witness().expect("tree is not empty");
|
||||
|
||||
let path = MerklePath::from((position, tree.authentication_path(position, &leaf).unwrap()));
|
||||
let path = MerklePath::from((position, tree.authentication_path(position, &leaf).expect("we just witnessed the path")));
|
||||
notes_and_auth_paths.push((*note, path));
|
||||
}
|
||||
|
||||
|
|
|
@ -285,7 +285,7 @@ pub mod testing {
|
|||
{
|
||||
let cmx = MerkleHashOrchard::from_bytes(&tv.leaves[i]).unwrap();
|
||||
tree.append(&cmx);
|
||||
tree.witness().unwrap();
|
||||
tree.witness().expect("tree is not empty");
|
||||
|
||||
assert_eq!(tree.root().0, pallas::Base::from_bytes(&tv.root).unwrap());
|
||||
|
||||
|
|
Loading…
Reference in New Issue