1
0
mirror of https://github.com/libp2p/go-libp2p-core.git synced 2025-04-28 17:10:14 +08:00

remove unneeded nil check in ECDSAPublicKey.Verify

This commit is contained in:
Marten Seemann 2022-04-10 10:31:25 +01:00
parent d296cf045e
commit 7e9da8d0cd

View File

@ -162,9 +162,6 @@ func (ePub *ECDSAPublicKey) Verify(data, sigBytes []byte) (bool, error) {
if _, err := asn1.Unmarshal(sigBytes, sig); err != nil {
return false, err
}
if sig == nil {
return false, ErrNilSig
}
hash := sha256.Sum256(data)