FROST clippy

This commit is contained in:
Luke Parker 2022-08-13 09:46:54 -04:00
parent 280fc441a7
commit 5d7798c5fb
No known key found for this signature in database
GPG key ID: F9F1386DB1E119B6
2 changed files with 4 additions and 4 deletions

View file

@ -83,7 +83,7 @@ fn verify_r1<Re: Read, R: RngCore + CryptoRng, C: Curve>(
our_commitments: Vec<C::G>,
mut serialized: HashMap<u16, Re>,
) -> Result<HashMap<u16, Vec<C::G>>, FrostError> {
validate_map(&mut serialized, &(1 ..= params.n()).collect::<Vec<_>>(), params.i())?;
validate_map(&serialized, &(1 ..= params.n()).collect::<Vec<_>>(), params.i())?;
let mut commitments = HashMap::new();
commitments.insert(params.i, our_commitments);
@ -189,7 +189,7 @@ fn complete_r2<Re: Read, R: RngCore + CryptoRng, C: Curve>(
commitments: &mut HashMap<u16, Vec<C::G>>,
mut serialized: HashMap<u16, Re>,
) -> Result<FrostCore<C>, FrostError> {
validate_map(&mut serialized, &(1 ..= params.n()).collect::<Vec<_>>(), params.i())?;
validate_map(&serialized, &(1 ..= params.n()).collect::<Vec<_>>(), params.i())?;
// Step 2. Verify each share
let mut shares = HashMap::new();

View file

@ -176,7 +176,7 @@ fn sign_with_share<Re: Read, C: Curve, A: Algorithm<C>>(
msg: &[u8],
) -> Result<(Package<C>, Vec<u8>), FrostError> {
let multisig_params = params.multisig_params();
validate_map(&mut commitments, &params.view.included, multisig_params.i)?;
validate_map(&commitments, &params.view.included, multisig_params.i)?;
{
// Domain separate FROST
@ -320,7 +320,7 @@ fn complete<Re: Read, C: Curve, A: Algorithm<C>>(
mut shares: HashMap<u16, Re>,
) -> Result<A::Signature, FrostError> {
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();