chore: check if pubkey is nil (#12623)

This commit is contained in:
Marko
2022-07-18 21:41:04 -04:00
committed by GitHub
parent e84b5a48c1
commit 2c03973194
2 changed files with 7 additions and 4 deletions
+6 -3
View File
@@ -47,10 +47,13 @@ func StatusCommand() *cobra.Command {
return err
}
var pk cryptotypes.PubKey
// `status` has TM pubkeys, we need to convert them to our pubkeys.
pk, err := cryptocodec.FromTmPubKeyInterface(status.ValidatorInfo.PubKey)
if err != nil {
return err
if status.ValidatorInfo.PubKey != nil {
pk, err = cryptocodec.FromTmPubKeyInterface(status.ValidatorInfo.PubKey)
if err != nil {
return err
}
}
statusWithPk := resultStatus{
NodeInfo: status.NodeInfo,
+1 -1
View File
@@ -5,7 +5,7 @@ go 1.18
require (
github.com/confio/ics23/go v0.7.0
github.com/cosmos/cosmos-sdk v0.46.0-rc3
github.com/cosmos/iavl v0.19.0
github.com/cosmos/iavl v0.18.0
github.com/lazyledger/smt v0.2.1-0.20210709230900-03ea40719554
github.com/tendermint/tendermint v0.34.20-rc1
github.com/tendermint/tm-db v0.6.7