mirror of
https://github.com/mii443/RustySecrets.git
synced 2025-08-22 16:25:32 +00:00
Fix arg order missing shares validation
The arguments were provided in the wrong order.
This commit is contained in:
committed by
Romain Ruetschi
parent
5b35c69c8e
commit
fd74534fa1
@ -81,7 +81,7 @@ pub(crate) fn validate_shares<S: IsShare>(shares: Vec<S>) -> Result<(u8, Vec<S>)
|
|||||||
let threshold = k_compatibility_sets.keys().last().unwrap().to_owned();
|
let threshold = k_compatibility_sets.keys().last().unwrap().to_owned();
|
||||||
|
|
||||||
if shares_count < threshold as usize {
|
if shares_count < threshold as usize {
|
||||||
bail!(ErrorKind::MissingShares(threshold as usize, shares_count));
|
bail!(ErrorKind::MissingShares(shares_count, threshold as usize));
|
||||||
}
|
}
|
||||||
|
|
||||||
Ok((threshold, result))
|
Ok((threshold, result))
|
||||||
|
Reference in New Issue
Block a user