Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[backport/v0.41.x]: fix: tendermint subcommands should not create missing files #8493

Merged
merged 2 commits into from
Feb 4, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ Ref: https://keepachangelog.com/en/1.0.0/

### Bug Fixes

* (server) [\#8481](https://github.com/cosmos/cosmos-sdk/pull/8481) Don't create files when running `{appd} tendermint show-*` subcommands.
* (client/keys) [\#8436](https://github.com/cosmos/cosmos-sdk/pull/8436) Fix keybase->keyring keys migration.

### Improvements
Expand Down
6 changes: 3 additions & 3 deletions server/tm_cmds.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func ShowNodeIDCmd() *cobra.Command {
serverCtx := GetServerContextFromCmd(cmd)
cfg := serverCtx.Config

nodeKey, err := p2p.LoadOrGenNodeKey(cfg.NodeKeyFile())
nodeKey, err := p2p.LoadNodeKey(cfg.NodeKeyFile())
if err != nil {
return err
}
Expand All @@ -48,7 +48,7 @@ func ShowValidatorCmd() *cobra.Command {
serverCtx := GetServerContextFromCmd(cmd)
cfg := serverCtx.Config

privValidator := pvm.LoadOrGenFilePV(cfg.PrivValidatorKeyFile(), cfg.PrivValidatorStateFile())
privValidator := pvm.LoadFilePV(cfg.PrivValidatorKeyFile(), cfg.PrivValidatorStateFile())
valPubKey, err := privValidator.GetPubKey()
if err != nil {
return err
Expand Down Expand Up @@ -86,7 +86,7 @@ func ShowAddressCmd() *cobra.Command {
serverCtx := GetServerContextFromCmd(cmd)
cfg := serverCtx.Config

privValidator := pvm.LoadOrGenFilePV(cfg.PrivValidatorKeyFile(), cfg.PrivValidatorStateFile())
privValidator := pvm.LoadFilePV(cfg.PrivValidatorKeyFile(), cfg.PrivValidatorStateFile())
valConsAddr := (sdk.ConsAddress)(privValidator.GetAddress())

output, _ := cmd.Flags().GetString(cli.OutputFlag)
Expand Down