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: Checking Vesting Coins with AmountOf #3486

Merged
merged 4 commits into from
Feb 4, 2019
Merged

Conversation

zmanian
Copy link
Member

@zmanian zmanian commented Feb 2, 2019

Removes the performance optimization when querying to see if vesting coins are in the correct state and just use AmountOf.

This bug was discovered on Game of Stakes 5.

Fixes #3483 and #3482

Would be benefit from multicoin unit tests.


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)

…oins for a more expensive but correct call to AmountOf
@codecov
Copy link

codecov bot commented Feb 2, 2019

Codecov Report

Merging #3486 into develop will increase coverage by 0.01%.
The diff coverage is 100%.

@@             Coverage Diff             @@
##           develop    #3486      +/-   ##
===========================================
+ Coverage    52.95%   52.97%   +0.01%     
===========================================
  Files          137      137              
  Lines        10746    10719      -27     
===========================================
- Hits          5691     5678      -13     
+ Misses        4705     4698       -7     
+ Partials       350      343       -7

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.

LGTM -- we should definitely add a test cases for multi-denom accounts. I can add those to this PR or as another. Thoughts @zmanian ?

@alessio
Copy link
Contributor

alessio commented Feb 2, 2019

Looks good to me - pending a changelog line and multi-denom coins set test case

cwgoes
cwgoes previously requested changes Feb 2, 2019
Copy link
Contributor

@cwgoes cwgoes left a comment

Choose a reason for hiding this comment

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

Thanks - let's add a testcase and a PENDING.md line - also let's double-check that we don't have any similar premature optimizations elsewhere in the x/auth module.

@alexanderbez
Copy link
Contributor

I'll take this over @zmanian 👍

@alexanderbez alexanderbez changed the title Checking Vesting Coins with AmountOf R4R: Checking Vesting Coins with AmountOf Feb 3, 2019
@jackzampolin
Copy link
Member

Is this ready to merge?

@cwgoes
Copy link
Contributor

cwgoes commented Feb 4, 2019

Is this ready to merge?

Can we add a testcase or two?

@alexanderbez
Copy link
Contributor

Updated. Should be good to merge @jackzampolin

@jackzampolin jackzampolin dismissed cwgoes’s stale review February 4, 2019 21:09

Comments addressed

@jackzampolin jackzampolin merged commit 3780b84 into develop Feb 4, 2019
@jackzampolin jackzampolin deleted the zaki/VestingAmountof branch February 4, 2019 21:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants