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

R4R: Using QueryWithData to query unbonding delegations. #4456

Merged
merged 3 commits into from
Jun 4, 2019
Merged

R4R: Using QueryWithData to query unbonding delegations. #4456

merged 3 commits into from
Jun 4, 2019

Conversation

yangyanqing
Copy link
Contributor

@yangyanqing yangyanqing commented May 31, 2019

close: #4455

  • Linked to github-issue with discussion and accepted design OR link to spec that describes this work.
  • Wrote tests
  • Updated relevant documentation (docs/)
  • Added a relevant changelog entry: clog add [section] [stanza] [message]
  • rereviewed Files changed in the github PR explorer

For Admin Use:

  • Added appropriate labels to PR (ex. wip, ready-for-review, docs)
  • Reviewers Assigned
  • Squashed all commits, uses message "Merge pull request #XYZ: [title]" (coding standards)

@yangyanqing yangyanqing changed the title WIP: Print null while query unbonding-delegation without item in queue. R4R: Print null while query unbonding-delegation got empty result. May 31, 2019
@codecov
Copy link

codecov bot commented May 31, 2019

Codecov Report

Merging #4456 into master will increase coverage by <.01%.
The diff coverage is 0%.

@@            Coverage Diff             @@
##           master    #4456      +/-   ##
==========================================
+ Coverage   54.63%   54.63%   +<.01%     
==========================================
  Files         250      250              
  Lines       16061    16064       +3     
==========================================
+ Hits         8775     8777       +2     
- Misses       6641     6642       +1     
  Partials      645      645

@codecov
Copy link

codecov bot commented May 31, 2019

Codecov Report

Merging #4456 into master will decrease coverage by 0.02%.
The diff coverage is 0%.

@@            Coverage Diff             @@
##           master    #4456      +/-   ##
==========================================
- Coverage    54.6%   54.57%   -0.03%     
==========================================
  Files         250      250              
  Lines       16074    16082       +8     
==========================================
  Hits         8777     8777              
- Misses       6649     6658       +9     
+ Partials      648      647       -1

Copy link
Contributor

@alexanderbez alexanderbez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there something nicer we can print? Maybe just a string or something saying no unbonding delegation exists?

@yangyanqing
Copy link
Contributor Author

yangyanqing commented May 31, 2019

Is there something nicer we can print? Maybe just a string or something saying no unbonding delegation exists?

First, I need to find a class implement interface fmt.Stringer to hold the sentence. Any suggestion?
Second, if I find the right class, I'll add it to GetCmdQueryValidatorDelegations().

@yangyanqing yangyanqing changed the title R4R: Print null while query unbonding-delegation got empty result. WIP: Print null while query unbonding-delegation got empty result. Jun 3, 2019
@yangyanqing yangyanqing changed the title WIP: Print null while query unbonding-delegation got empty result. R4R: Add test for QueryUnbondingDelegation Jun 4, 2019
@yangyanqing yangyanqing changed the title R4R: Add test for QueryUnbondingDelegation R4R: Using QueryWithData to query unbonding delegations. Jun 4, 2019
@yangyanqing
Copy link
Contributor Author

x/staking/querier/querier.go had implement return Error when no delegation was found. But the cli did not call queryUnbondingDelegation and queryDelegatorUnbondingDelegations.

So I replace QueryStore() by QueryWithData().

But I can't find the way to verify the modification, there was no cli_test on master.

@alexanderbez

Copy link
Contributor

@alexanderbez alexanderbez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK ☕️

@alexanderbez alexanderbez merged commit 3055025 into cosmos:master Jun 4, 2019
@yangyanqing yangyanqing deleted the frank/4455-unbonding-delegation branch June 4, 2019 12:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

query unbonding-delegation cause panic while no item in queue.
2 participants