mirror of
https://github.com/serai-dex/serai.git
synced 2024-11-16 17:07:35 +00:00
FROST clippy
This commit is contained in:
parent
280fc441a7
commit
5d7798c5fb
2 changed files with 4 additions and 4 deletions
|
@ -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();
|
||||
|
|
|
@ -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, ¶ms.view.included, multisig_params.i)?;
|
||||
validate_map(&commitments, ¶ms.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();
|
||||
|
|
Loading…
Reference in a new issue