Fix complains and bad test (#11555)

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
This commit is contained in:
terencechain
2022-10-17 09:20:26 -07:00
committed by GitHub
parent dcba27ffbc
commit e8400a0773
8 changed files with 8 additions and 105 deletions

View File

@@ -11,7 +11,10 @@ import (
)
func ConvertFromInterfacePrivKey(privkey crypto.PrivKey) (*ecdsa.PrivateKey, error) {
secpKey := (privkey.(*crypto.Secp256k1PrivateKey))
secpKey, ok := privkey.(*crypto.Secp256k1PrivateKey)
if !ok {
return nil, errors.New("could not cast to Secp256k1PrivateKey")
}
rawKey, err := secpKey.Raw()
if err != nil {
return nil, err