Skip to content

Commit

Permalink
mpc: test entropy in more deterministic way
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-orlovsky committed Jul 10, 2023
1 parent b678fff commit b19f85a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion commit_verify/src/mpc/tree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,12 @@ mod test {
let mut tree = make_random_tree(&msgs);
let id1 = tree.commitment_id();

tree.entropy = random();
tree.entropy = loop {
let entropy = random();
if entropy != tree.entropy {
break entropy;
}
};
let id2 = tree.commitment_id();

assert_ne!(id1, id2);
Expand Down

0 comments on commit b19f85a

Please sign in to comment.