chore: check if pubkey is nil (#12623)

This commit is contained in:
Marko 2022-07-19 03:41:04 +02:00 committed by GitHub
parent e84b5a48c1
commit 2c03973194
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 4 deletions

View File

@ -47,11 +47,14 @@ 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 status.ValidatorInfo.PubKey != nil {
pk, err = cryptocodec.FromTmPubKeyInterface(status.ValidatorInfo.PubKey)
if err != nil {
return err
}
}
statusWithPk := resultStatus{
NodeInfo: status.NodeInfo,
SyncInfo: status.SyncInfo,

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