Skip to content

CLI: validator-outstanding-rewards #4493

@alexanderbez

Description

@alexanderbez

Summary of Bug

$ gaiacli query distr validator-outstanding-rewards
ERROR: {"codespace":"sdk","code":6,"message":"incorrectly formatted request data; UnmarshalJSON cannot decode empty bytes"} 

The command isn't implemented correctly at all. The command should take as input a validator address and properly create the query params.

Current:

			route := fmt.Sprintf("custom/%s/validator_outstanding_rewards", queryRoute)
			res, err := cliCtx.QueryWithData(route, []byte{})
			if err != nil {
				return err
			}

Should be:

			route := fmt.Sprintf("custom/%s/validator_outstanding_rewards", queryRoute)
			res, err := cliCtx.QueryWithData(route, paramBytes)
			if err != nil {
				return err
			}

We really need to improve our CLI testing....

Version

5f9c3fdf88952ea43316f1a18de572e7ae3c13f6


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions