Skip to content

Commit 7baa4f3

Browse files
authored
fix: ensure tendermint-validator-set respects output flag (#11065)
1 parent dd0d712 commit 7baa4f3

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
3838
## [Unreleased]
3939

4040
### Features
41+
4142
* [\#10977](https://github.com/cosmos/cosmos-sdk/pull/10977) Now every cosmos message protobuf definition must be extended with a ``cosmos.msg.v1.signer`` option to signal the signer fields in a language agnostic way.
4243
* [\#10710](https://github.com/cosmos/cosmos-sdk/pull/10710) Chain-id shouldn't be required for creating a transaction with both --generate-only and --offline flags.
4344
* [\#10703](https://github.com/cosmos/cosmos-sdk/pull/10703) Create a new grantee account, if the grantee of an authorization does not exist.
@@ -154,6 +155,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
154155

155156
### Bug Fixes
156157

158+
* (cli) [\#11065](https://github.com/cosmos/cosmos-sdk/pull/11065) Ensure the `tendermint-validator-set` query command respects the `-o` output flag.
157159
* (grpc) [\#10985](https://github.com/cosmos/cosmos-sdk/pull/10992) The `/cosmos/tx/v1beta1/txs/{hash}` endpoint returns a 404 when a tx does not exist.
158160
* (rosetta) [\#10340](https://github.com/cosmos/cosmos-sdk/pull/10340) Use `GenesisChunked(ctx)` instead `Genesis(ctx)` to get genesis block height
159161
* [#10180](https://github.com/cosmos/cosmos-sdk/issues/10180) Documentation: make references to Cosmos SDK consistent

client/rpc/validators.go

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import (
77
"strings"
88

99
"github.com/spf13/cobra"
10+
tmcli "github.com/tendermint/tendermint/libs/cli"
1011
tmtypes "github.com/tendermint/tendermint/types"
1112

1213
"github.com/cosmos/cosmos-sdk/client"
@@ -30,17 +31,18 @@ func ValidatorCommand() *cobra.Command {
3031
if err != nil {
3132
return err
3233
}
34+
3335
var height *int64
3436

3537
// optional height
3638
if len(args) > 0 {
37-
h, err := strconv.Atoi(args[0])
39+
val, err := strconv.ParseInt(args[0], 10, 64)
3840
if err != nil {
3941
return err
4042
}
41-
if h > 0 {
42-
tmp := int64(h)
43-
height = &tmp
43+
44+
if val > 0 {
45+
height = &val
4446
}
4547
}
4648

@@ -56,8 +58,8 @@ func ValidatorCommand() *cobra.Command {
5658
},
5759
}
5860

59-
cmd.Flags().StringP(flags.FlagNode, "n", "tcp://localhost:26657", "Node to connect to")
60-
cmd.Flags().String(flags.FlagKeyringBackend, flags.DefaultKeyringBackend, "Select keyring's backend (os|file|kwallet|pass|test)")
61+
cmd.Flags().String(flags.FlagNode, "tcp://localhost:26657", "<host>:<port> to Tendermint RPC interface for this chain")
62+
cmd.Flags().StringP(tmcli.OutputFlag, "o", "text", "Output format (text|json)")
6163
cmd.Flags().Int(flags.FlagPage, query.DefaultPage, "Query a specific page of paginated results")
6264
cmd.Flags().Int(flags.FlagLimit, 100, "Query number of results returned per page")
6365

0 commit comments

Comments
 (0)