Merge pull request #2257 from filecoin-project/fix/lotus-shed-keyinfo-switch

lotus-shed: fix secp256k1
This commit is contained in:
Łukasz Magiera 2020-07-03 21:13:50 +02:00 committed by GitHub
commit ff1cceb7bd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -121,8 +121,7 @@ var keyinfoImportCmd = &cli.Command{
fmt.Printf("%s\n", peerid.String())
break
case wallet.KTSecp256k1:
case wallet.KTBLS:
case wallet.KTSecp256k1, wallet.KTBLS:
w, err := wallet.NewWallet(keystore)
if err != nil {
return err
@ -223,8 +222,7 @@ var keyinfoInfoCmd = &cli.Command{
kio.PublicKey = base64.StdEncoding.EncodeToString(pkBytes)
break
case wallet.KTSecp256k1:
case wallet.KTBLS:
case wallet.KTSecp256k1, wallet.KTBLS:
kio.Type = keyInfo.Type
key, err := wallet.NewKey(keyInfo)
@ -311,8 +309,7 @@ var keyinfoNewCmd = &cli.Command{
keyInfo = ki
break
case wallet.KTSecp256k1:
case wallet.KTBLS:
case wallet.KTSecp256k1, wallet.KTBLS:
key, err := wallet.GenerateKey(wallet.ActSigType(keyType))
if err != nil {
return err