diff --git a/crypto/vss/feldman_vss.go b/crypto/vss/feldman_vss.go index d6636740..455a4922 100644 --- a/crypto/vss/feldman_vss.go +++ b/crypto/vss/feldman_vss.go @@ -42,7 +42,7 @@ var ( // Check share ids of Shamir's Secret Sharing, return error if duplicate or 0 value found func CheckIndexes(ec elliptic.Curve, indexes []*big.Int) ([]*big.Int, error) { visited := make(map[string]struct{}) - for i, v := range indexes { + for _, v := range indexes { vMod := new(big.Int).Mod(v, ec.Params().N) if vMod.Cmp(zero) == 0 { return nil, errors.New("party index should not be 0") @@ -52,7 +52,6 @@ func CheckIndexes(ec elliptic.Curve, indexes []*big.Int) ([]*big.Int, error) { return nil, fmt.Errorf("duplicate indexes %s", vModStr) } visited[vModStr] = struct{}{} - indexes[i] = vMod } return indexes, nil }