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.
This commit is contained in:
Romain Ruetschi
2018-05-11 16:50:52 +02:00
parent 2066102afa
commit 06033f1c0e

View File

@ -83,7 +83,7 @@ pub(crate) fn validate_shares<S: IsShare>(shares: &Vec<S>) -> Result<(u8, usize)
}
pub(crate) fn validate_share_count(threshold: u8, shares_count: u8) -> Result<(u8, u8)> {
if threshold < MIN_SHARES {
if threshold < MIN_THRESHOLD {
bail!(ErrorKind::ThresholdTooSmall(threshold));
}
if shares_count > MAX_SHARES {