Skip to content

Commit

Permalink
fix golint
Browse files Browse the repository at this point in the history
  • Loading branch information
colinlyguo committed Jul 9, 2024
1 parent 0c25c3d commit 4e32d76
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions common/libzkp/impl/src/batch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -154,14 +154,10 @@ pub unsafe extern "C" fn gen_batch_proof(

/// # Safety
#[no_mangle]
pub unsafe extern "C" fn verify_batch_proof(
proof: *const c_char,
) -> c_char {
pub unsafe extern "C" fn verify_batch_proof(proof: *const c_char) -> c_char {
let proof = c_char_to_vec(proof);
let proof = serde_json::from_slice::<BatchProof>(proof.as_slice()).unwrap();
let verified = panic_catch(|| {
VERIFIER.get().unwrap().verify_agg_evm_proof(proof)
});
let verified = panic_catch(|| VERIFIER.get().unwrap().verify_agg_evm_proof(proof));
verified.unwrap_or(false) as c_char
}

Expand Down

0 comments on commit 4e32d76

Please sign in to comment.