Skip to content

Commit

Permalink
Update threshold condition
Browse files Browse the repository at this point in the history
Co-authored-by: pierluca <[email protected]>
  • Loading branch information
jbsv and pierluca authored Jul 19, 2023
1 parent aefac52 commit 96596fd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dkg/pedersen/pedersen.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,8 @@ func (a *Actor) Setup(coAuth crypto.CollectiveAuthority, threshold int) (kyber.P
return nil, xerrors.Errorf("startRes is already done, only one setup call is allowed")
}

if threshold <= 1 {
return nil, xerrors.Errorf("DKG threshold needs to be > 1")
if threshold < 2 || threshold > coAuth.Len() {
return nil, xerrors.Errorf("DKG thresold (%d) needs to be between 2 and %d", threshold, coAuth.Len())```

Check failure on line 122 in dkg/pedersen/pedersen.go

View workflow job for this annotation

GitHub Actions / lint

syntax error: unexpected literal `` at end of statement

Check failure on line 122 in dkg/pedersen/pedersen.go

View workflow job for this annotation

GitHub Actions / lint

string not terminated (compile)

Check failure on line 122 in dkg/pedersen/pedersen.go

View workflow job for this annotation

GitHub Actions / lint

syntax error: unexpected literal `` at end of statement

Check failure on line 122 in dkg/pedersen/pedersen.go

View workflow job for this annotation

GitHub Actions / lint

string not terminated (compile)

Check failure on line 122 in dkg/pedersen/pedersen.go

View workflow job for this annotation

GitHub Actions / test (ubuntu-latest)

syntax error: unexpected literal `` at end of statement

Check failure on line 122 in dkg/pedersen/pedersen.go

View workflow job for this annotation

GitHub Actions / test (ubuntu-latest)

string not terminated

Check failure on line 122 in dkg/pedersen/pedersen.go

View workflow job for this annotation

GitHub Actions / test (macos-latest)

syntax error: unexpected literal `` at end of statement

Check failure on line 122 in dkg/pedersen/pedersen.go

View workflow job for this annotation

GitHub Actions / test (macos-latest)

string not terminated
}

ctx, cancel := context.WithTimeout(context.Background(), setupTimeout)
Expand Down

0 comments on commit 96596fd

Please sign in to comment.