|
@@ -219,7 +219,7 @@ mod tests {
|
|
fn share_commitment_valid() {
|
|
fn share_commitment_valid() {
|
|
let s = Secret::from(42u32);
|
|
let s = Secret::from(42u32);
|
|
|
|
|
|
- let res = generate_shares(s, 5, 2);
|
|
|
|
|
|
+ let res = generate_shares(s, 8, 3);
|
|
assert!(res.is_ok());
|
|
assert!(res.is_ok());
|
|
let (com, shares) = res.unwrap();
|
|
let (com, shares) = res.unwrap();
|
|
|
|
|
|
@@ -233,13 +233,13 @@ mod tests {
|
|
#[test]
|
|
#[test]
|
|
fn share_commitment_invalid() {
|
|
fn share_commitment_invalid() {
|
|
let s1 = Secret::from(42u32);
|
|
let s1 = Secret::from(42u32);
|
|
- let s2 = Secret::from(43u32);
|
|
|
|
|
|
+ let s2 = Secret::from(42u32);
|
|
|
|
|
|
- let res1 = generate_shares(s1, 5, 2);
|
|
|
|
|
|
+ let res1 = generate_shares(s1, 8, 3);
|
|
assert!(res1.is_ok());
|
|
assert!(res1.is_ok());
|
|
let (_, shares1) = res1.unwrap();
|
|
let (_, shares1) = res1.unwrap();
|
|
|
|
|
|
- let res2 = generate_shares(s2, 5, 2);
|
|
|
|
|
|
+ let res2 = generate_shares(s2, 8, 3);
|
|
assert!(res2.is_ok());
|
|
assert!(res2.is_ok());
|
|
let (com2, _) = res2.unwrap();
|
|
let (com2, _) = res2.unwrap();
|
|
|
|
|