fix!: update gentx val pub key input parsing (#9827)
This commit is contained in:
@@ -77,10 +77,9 @@ $ %s gentx my-key-name 1000000stake --home=/path/to/home/dir --keyring-backend=o
|
||||
}
|
||||
|
||||
// read --pubkey, if empty take it from priv_validator.json
|
||||
if val, _ := cmd.Flags().GetString(cli.FlagPubKey); val != "" {
|
||||
err = clientCtx.Codec.UnmarshalJSON([]byte(val), valPubKey)
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "failed to unmarshal consensus node public key")
|
||||
if pkStr, _ := cmd.Flags().GetString(cli.FlagPubKey); pkStr != "" {
|
||||
if err := clientCtx.Codec.UnmarshalInterfaceJSON([]byte(pkStr), &valPubKey); err != nil {
|
||||
return errors.Wrap(err, "failed to unmarshal validator public key")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -46,8 +46,7 @@ func TestInitCmd(t *testing.T) {
|
||||
}
|
||||
},
|
||||
shouldErr: false,
|
||||
|
||||
err: nil,
|
||||
err: nil,
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user