mirror of
https://github.com/logos-blockchain/lssa.git
synced 2026-01-03 22:03:06 +00:00
add test_get_membership_proof
This commit is contained in:
parent
552b285b2f
commit
dd755f4ba3
@ -161,4 +161,19 @@ mod tests {
|
||||
assert!(result.is_none());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_get_membership_proof() {
|
||||
let mut smt = UTXOSparseMerkleTree::new();
|
||||
let utxo = sample_utxo();
|
||||
|
||||
smt.insert_item(utxo.clone()).unwrap();
|
||||
|
||||
// Fetch membership proof for the inserted UTXO
|
||||
let proof = smt.get_membership_proof(utxo.hash).unwrap();
|
||||
|
||||
// Test proof is generated successfully
|
||||
assert!(proof.is_some());
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user