diff --git a/crypto/frost/src/key_gen.rs b/crypto/frost/src/key_gen.rs index 802e8961..a2789ab7 100644 --- a/crypto/frost/src/key_gen.rs +++ b/crypto/frost/src/key_gen.rs @@ -83,7 +83,7 @@ fn verify_r1( our_commitments: Vec, mut serialized: HashMap, ) -> Result>, FrostError> { - validate_map(&mut serialized, &(1 ..= params.n()).collect::>(), params.i())?; + validate_map(&serialized, &(1 ..= params.n()).collect::>(), params.i())?; let mut commitments = HashMap::new(); commitments.insert(params.i, our_commitments); @@ -189,7 +189,7 @@ fn complete_r2( commitments: &mut HashMap>, mut serialized: HashMap, ) -> Result, FrostError> { - validate_map(&mut serialized, &(1 ..= params.n()).collect::>(), params.i())?; + validate_map(&serialized, &(1 ..= params.n()).collect::>(), params.i())?; // Step 2. Verify each share let mut shares = HashMap::new(); diff --git a/crypto/frost/src/sign.rs b/crypto/frost/src/sign.rs index aff1e438..7faf3d4c 100644 --- a/crypto/frost/src/sign.rs +++ b/crypto/frost/src/sign.rs @@ -176,7 +176,7 @@ fn sign_with_share>( msg: &[u8], ) -> Result<(Package, Vec), FrostError> { let multisig_params = params.multisig_params(); - validate_map(&mut commitments, ¶ms.view.included, multisig_params.i)?; + validate_map(&commitments, ¶ms.view.included, multisig_params.i)?; { // Domain separate FROST @@ -320,7 +320,7 @@ fn complete>( mut shares: HashMap, ) -> Result { let params = sign_params.multisig_params(); - validate_map(&mut shares, &sign_params.view.included, params.i)?; + validate_map(&shares, &sign_params.view.included, params.i)?; let mut responses = HashMap::new(); let mut sum = C::F::zero();