Correct amount of yx coefficients, get processor key gen test to pass

This commit is contained in:
Luke Parker
2024-08-02 05:03:14 -04:00
parent b5bf70bdb1
commit 9e716c07fc
7 changed files with 53 additions and 35 deletions

View File

@@ -489,7 +489,7 @@ impl<C: EvrfCurve> EvrfDkg<C> {
// reconstruct the key regardless, this is safe to the threshold
{
let mut participating_weight = 0;
let mut evrf_public_keys = evrf_public_keys.to_vec();
let mut evrf_public_keys_mut = evrf_public_keys.to_vec();
for i in valid.keys() {
let evrf_public_key = evrf_public_keys[usize::from(u16::from(*i)) - 1];
@@ -502,9 +502,9 @@ impl<C: EvrfCurve> EvrfDkg<C> {
all other participants, so this is still a key generated by an amount of participants who
could simply reconstruct the key.
*/
let start_len = evrf_public_keys.len();
evrf_public_keys.retain(|key| *key != evrf_public_key);
let end_len = evrf_public_keys.len();
let start_len = evrf_public_keys_mut.len();
evrf_public_keys_mut.retain(|key| *key != evrf_public_key);
let end_len = evrf_public_keys_mut.len();
let count = start_len - end_len;
participating_weight += count;