Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
unwrap results
Browse files Browse the repository at this point in the history
  • Loading branch information
Achim Schneider committed Mar 19, 2023
1 parent de3cfbd commit b0df1e1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions primitives/arkworks/src/ed_on_bls12_381.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ pub fn te_msm(bases: Vec<u8>, scalars: Vec<u8>) -> Vec<u8> {

/// Compute a multi scalar multiplication on G! through arkworks
pub fn sw_msm(bases: Vec<u8>, scalars: Vec<u8>) -> Vec<u8> {
let bases: Vec<_> = serialize_iter_to_vec::<SWAffine<JubjubConfig>>(bases);
let bases: Vec<_> = serialize_iter_to_vec::<SWAffine<JubjubConfig>>(bases).unwrap();
let scalars: Vec<_> =
serialize_iter_to_vec::<<JubjubConfig as CurveConfig>::ScalarField>(scalars).unwrap();

let result = <SWProjective as VariableBaseMSM>::msm(&bases, &scalars).unwrap();
let result = <SWProjective as VariableBaseMSM>::msm(&bases, &scalars[..]).unwrap();

serialize_result(result)
}

0 comments on commit b0df1e1

Please sign in to comment.