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

CLI: validator-outstanding-rewards #4493

Closed
4 tasks
alexanderbez opened this issue Jun 6, 2019 · 0 comments · Fixed by #4494
Closed
4 tasks

CLI: validator-outstanding-rewards #4493

alexanderbez opened this issue Jun 6, 2019 · 0 comments · Fixed by #4494
Assignees
Labels
C:CLI C:x/distribution distribution module related T:Bug

Comments

@alexanderbez
Copy link
Contributor

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C:CLI C:x/distribution distribution module related T:Bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant