Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: result set path error #268

Merged
merged 1 commit into from
Sep 4, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion grovedb/src/operations/proof/verify.rs
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@
query: &PathQuery,
is_verbose: bool,
) -> Result<[u8; 32], Error> {
let (proof_version, proof) = read_and_consume_proof_version(proof)?;

Check warning on line 263 in grovedb/src/operations/proof/verify.rs

View workflow job for this annotation

GitHub Actions / clippy

unused variable: `proof_version`

warning: unused variable: `proof_version` --> grovedb/src/operations/proof/verify.rs:263:14 | 263 | let (proof_version, proof) = read_and_consume_proof_version(proof)?; | ^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_proof_version` | = note: `#[warn(unused_variables)]` on by default
let mut proof_reader = ProofReader::new_with_verbose_status(proof, is_verbose);

let path_slices = query.path.iter().map(|x| x.as_slice()).collect::<Vec<_>>();
Expand Down Expand Up @@ -678,7 +678,6 @@
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 @@
current_path.to_owned(),
)?;

current_path.push(last_key);

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