Skip to content

Commit

Permalink
fix: if the commitment is not available we return zero
Browse files Browse the repository at this point in the history
  • Loading branch information
kevaundray committed May 15, 2024
1 parent 7330a84 commit 1c2cd88
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion verkle-trie/src/proof/verifier.rs
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,10 @@ pub fn create_verifier_queries(
child_path.push(*z);
let y = match leaf_values_by_path_and_z.get(&(path.clone(), *z)) {
Some(val) => *val,
None => group_to_field(&commitments_by_path[&child_path]),
None => match commitments_by_path.get(&child_path) {
Some(commitment_by_path) => group_to_field(&commitment_by_path),

Check failure on line 206 in verkle-trie/src/proof/verifier.rs

View workflow job for this annotation

GitHub Actions / Lints

this expression creates a reference which is immediately dereferenced by the compiler
None => Fr::zero(),
},
};

ys_by_path_and_z.insert((path.clone(), *z), y);
Expand Down

0 comments on commit 1c2cd88

Please sign in to comment.