mirror of
https://github.com/logos-blockchain/lssa.git
synced 2026-01-07 07:43:11 +00:00
add test_get_membership_proof_not_exists
This commit is contained in:
parent
dd755f4ba3
commit
4de3f95f1f
@ -175,5 +175,15 @@ mod tests {
|
||||
assert!(proof.is_some());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_get_membership_proof_not_exists() {
|
||||
let mut smt = UTXOSparseMerkleTree::new();
|
||||
|
||||
// Try fetching proof for a non-existent UTXO hash
|
||||
let non_existent_hash = TreeHashType::default();
|
||||
let proof = smt.get_membership_proof(non_existent_hash).unwrap();
|
||||
|
||||
// Test no proof is generated for a non-existent UTXO
|
||||
assert!(proof.is_none());
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user