diff --git a/tests/memory_keccak.rs b/tests/memory_keccak.rs index 9b5bd97..5fdd6fe 100644 --- a/tests/memory_keccak.rs +++ b/tests/memory_keccak.rs @@ -91,6 +91,10 @@ fn insert_delete() -> Result<()> { assert_eq!(mt.root(), MyFr(roots[i])); } + for (i, &leaf) in leaves.iter().enumerate() { + assert!(mt.verify(&MyFr(leaf), &mt.proof(i)?)); + } + for i in (0..leaves.len()).rev() { mt.delete(i)?; } diff --git a/tests/sled_keccak.rs b/tests/sled_keccak.rs index 61fa15b..6c9f18e 100644 --- a/tests/sled_keccak.rs +++ b/tests/sled_keccak.rs @@ -106,6 +106,10 @@ fn insert_delete() -> Result<()> { assert_eq!(mt.root(), MyFr(roots[i])); } + for (i, &leaf) in leaves.iter().enumerate() { + assert!(mt.verify(&MyFr(leaf), &mt.proof(i)?)); + } + for i in (0..leaves.len()).rev() { mt.delete(i)?; }