Skip to content

Commit

Permalink
Optimization of function signChallenge() (#485)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mdaiki0730 authored Nov 9, 2022
1 parent 65eeb6e commit 89101eb
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions p2p/conn/secret_connection.go
Original file line number Diff line number Diff line change
Expand Up @@ -389,11 +389,7 @@ func sort32(foo, bar *[32]byte) (lo, hi *[32]byte) {
}

func signChallenge(challenge *[32]byte, locPrivKey crypto.PrivKey) ([]byte, error) {
signature, err := locPrivKey.Sign(challenge[:])
if err != nil {
return nil, err
}
return signature, nil
return locPrivKey.Sign(challenge[:])
}

type authSigMessage struct {
Expand Down

0 comments on commit 89101eb

Please sign in to comment.