diff --git a/shardtree/src/lib.rs b/shardtree/src/lib.rs index 7779cb3..98376a4 100644 --- a/shardtree/src/lib.rs +++ b/shardtree/src/lib.rs @@ -1162,7 +1162,8 @@ impl< cur_addr = cur_addr.parent(); } - Ok(MerklePath::from_parts(witness, position).unwrap()) + Ok(MerklePath::from_parts(witness, position) + .expect("witness has length DEPTH because we extended it to the root")) } fn witness_internal(