mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-14 06:59:24 +00:00
Correct amount of yx coefficients, get processor key gen test to pass
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user