Skip to content

Commit

Permalink
chore: check if pubkey is nil (#12623)
Browse files Browse the repository at this point in the history
  • Loading branch information
tac0turtle authored Jul 19, 2022
1 parent e84b5a4 commit 2c03973
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
9 changes: 6 additions & 3 deletions client/rpc/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion store/tools/ics23/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2c03973

Please sign in to comment.