Skip to content

Commit

Permalink
remove unreachable code
Browse files Browse the repository at this point in the history
Signed-off-by: bytemare <[email protected]>
  • Loading branch information
bytemare committed Oct 7, 2024
1 parent 6fcca60 commit a42fbf4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
11 changes: 2 additions & 9 deletions coordinator.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ func (s *Signature) Clear() {
// The coordinator should verify this signature using the group public key before publishing or releasing the signature.
// This aggregate signature will verify if and only if all signature shares are valid. If an invalid share is identified
// a reasonable approach is to remove the signer from the set of allowed participants in future runs of FROST. If verify
// is set to true, AggregateSignatures will automatically verify the signature shares and the output signature, and will
// return an error with the first encountered invalid signature share.
// is set to true, AggregateSignatures will automatically verify the signature shares, and will return an error on the
// first encountered invalid signature share

Check failure on line 45 in coordinator.go

View workflow job for this annotation

GitHub Actions / Lint / GolangCI-Lint

Comment should end in a period (godot)
func (c *Configuration) AggregateSignatures(
message []byte,
sigShares []*SignatureShare,
Expand Down Expand Up @@ -75,13 +75,6 @@ func (c *Configuration) AggregateSignatures(
return nil, err
}

// Verify the final signature. Failure is unlikely to happen, as the signature is valid if the signature shares are.
if verify {
if err = VerifySignature(c.Ciphersuite, message, signature, c.GroupPublicKey); err != nil {
return nil, err
}
}

return signature, nil
}

Expand Down
2 changes: 1 addition & 1 deletion encoding.go
Original file line number Diff line number Diff line change
Expand Up @@ -755,7 +755,7 @@ func (s *signatureShadow) init(g ecc.Group) {
func unmarshalJSON(data []byte, target shadowInit) error {
g, err := encoding.JSONReGetGroup(string(data))
if err != nil {
return err
return fmt.Errorf("%w", err)

Check warning on line 758 in encoding.go

View check run for this annotation

Codecov / codecov/patch

encoding.go#L758

Added line #L758 was not covered by tests
}

target.init(g)
Expand Down

0 comments on commit a42fbf4

Please sign in to comment.