Skip to content

Commit 06033f1

Browse files
committed
Fix wrong validation of threshold
Fortunately as both MIN_SHARES and MIN_THRESHOLD are both set to 2 in errors.rs, the typo had no impact on validation correctness.
1 parent 2066102 commit 06033f1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/share/validation.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ pub(crate) fn validate_shares<S: IsShare>(shares: &Vec<S>) -> Result<(u8, usize)
8383
}
8484

8585
pub(crate) fn validate_share_count(threshold: u8, shares_count: u8) -> Result<(u8, u8)> {
86-
if threshold < MIN_SHARES {
86+
if threshold < MIN_THRESHOLD {
8787
bail!(ErrorKind::ThresholdTooSmall(threshold));
8888
}
8989
if shares_count > MAX_SHARES {

0 commit comments

Comments
 (0)