mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-28 23:56:43 +00:00
crypto/secp256r1: refactor by simplfying return
(cherry picked from commit 1be1875156)
This commit is contained in:
parent
0d115db168
commit
d64d8e73c1
1 changed files with 1 additions and 5 deletions
|
|
@ -28,11 +28,7 @@ func Verify(hash []byte, r, s, x, y *big.Int) bool {
|
|||
|
||||
// Verify the signature with the public key,
|
||||
// then return true if it's valid, false otherwise
|
||||
if ok := ecdsa.Verify(publicKey, hash, r, s); ok {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
return ecdsa.Verify(publicKey, hash, r, s)
|
||||
}
|
||||
|
||||
// Check the malleability issue
|
||||
|
|
|
|||
Loading…
Reference in a new issue