You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I just noticed that proofs for keys that are overwritten twice are incorrect and fail to verify using verify_membership().
Here's a failing test ->
fnkey_overwrite(){letmut tree = AvlTree::new();
tree.insert("K",[1]);
tree.insert("K",[0]);
tree.insert("K",[2]);assert!(check_integrity(&tree.root));let root = tree
.root_hash().expect("Unable to retrieve root hash").as_bytes().to_vec();let proof = tree
.get_proof("K").expect("Unable to retrieve a proof for 'K'");let spec = get_proof_spec();assert!(verify_membership(&proof,&spec,&root,"K".as_bytes(),&[0]));}
The text was updated successfully, but these errors were encountered:
The test is indeed failing but that is because the expected value must be passed as the last argument of verify_membership, in this case "K" has the value 2 but you passed 0, the assertion should be:
Hi,
I just noticed that proofs for keys that are overwritten twice are incorrect and fail to verify using
verify_membership()
.Here's a failing test ->
The text was updated successfully, but these errors were encountered: