client: fix validator's command pagination default page (#7278)

Fix issue encountered in the stargate-2 testnet:

 Error: RPC error -32603 - Internal error: page should be within [1, 1] range, given 0

Co-authored-by: Helder Moreira <helder@tendermint.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This commit is contained in:
Alessio Treglia 2020-09-10 19:36:49 +01:00 committed by GitHub
parent b2348180b8
commit d4b0e5baab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -56,7 +56,7 @@ func ValidatorCommand() *cobra.Command {
cmd.Flags().StringP(flags.FlagNode, "n", "tcp://localhost:26657", "Node to connect to")
cmd.Flags().String(flags.FlagKeyringBackend, flags.DefaultKeyringBackend, "Select keyring's backend (os|file|kwallet|pass|test)")
cmd.Flags().Int(flags.FlagPage, 0, "Query a specific page of paginated results")
cmd.Flags().Int(flags.FlagPage, rest.DefaultPage, "Query a specific page of paginated results")
cmd.Flags().Int(flags.FlagLimit, 100, "Query number of results returned per page")
return cmd