Skip to content

Commit

Permalink
add last key to subquery path only after subquery path verification (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
iammadab authored Sep 4, 2023
1 parent cc1b577 commit 8380363
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion grovedb/src/operations/proof/verify.rs
Original file line number Diff line number Diff line change
Expand Up @@ -678,7 +678,6 @@ impl ProofVerifier {
ProofTokenType::Merk | ProofTokenType::SizedMerk => {
let mut key_as_query = Query::new();
key_as_query.insert_key(last_key.to_owned());
current_path.push(last_key);

let verification_result = self.execute_merk_proof(
proof_token_type,
Expand All @@ -688,6 +687,8 @@ impl ProofVerifier {
current_path.to_owned(),
)?;

current_path.push(last_key);

Ok((verification_result.0, verification_result.1, false))
}
_ => Err(Error::InvalidProof(
Expand Down

0 comments on commit 8380363

Please sign in to comment.