mirror of
https://github.com/mii443/RustySecrets.git
synced 2025-08-22 16:25:32 +00:00
Simplify threshold consistency validation
Since the validation already confirms `shares` is not empty, `k_sets` will never match 0.
This commit is contained in:
committed by
Romain Ruetschi
parent
55b7c78a3a
commit
5b35c69c8e
@ -64,7 +64,6 @@ pub(crate) fn validate_shares<S: IsShare>(shares: Vec<S>) -> Result<(u8, Vec<S>)
|
|||||||
let k_sets = k_compatibility_sets.keys().count();
|
let k_sets = k_compatibility_sets.keys().count();
|
||||||
|
|
||||||
match k_sets {
|
match k_sets {
|
||||||
0 => bail!(ErrorKind::EmptyShares),
|
|
||||||
1 => {} // All shares have the same roothash.
|
1 => {} // All shares have the same roothash.
|
||||||
_ => {
|
_ => {
|
||||||
bail! {
|
bail! {
|
||||||
|
Reference in New Issue
Block a user