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

refactor: Improve AllocateTokens #13524

Merged
merged 2 commits into from Oct 12, 2022
Merged

refactor: Improve AllocateTokens #13524

merged 2 commits into from Oct 12, 2022

Conversation

alexanderbez
Copy link
Contributor

@alexanderbez alexanderbez commented Oct 12, 2022

Description

Closes: #13520

Note, this is NOT SM breaking. Just a minor perf improvement to not do the same math over and over again.


Author Checklist

All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.

I have...

  • included the correct type prefix in the PR title
  • added ! to the type prefix if API or client breaking change
  • targeted the correct branch (see PR Targeting)
  • provided a link to the relevant issue or specification
  • followed the guidelines for building modules
  • included the necessary unit and integration tests
  • added a changelog entry to CHANGELOG.md
  • included comments for documenting Go code
  • updated the relevant documentation or specification
  • reviewed "Files changed" and left comments if necessary
  • confirmed all CI checks have passed

Reviewers Checklist

All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.

I have...

  • confirmed the correct type prefix in the PR title
  • confirmed ! in the type prefix if API or client breaking change
  • confirmed all author checklist items have been addressed
  • reviewed state machine logic
  • reviewed API design and naming
  • reviewed documentation is accurate
  • reviewed tests and test coverage
  • manually tested (if applicable)

@alexanderbez alexanderbez changed the title refactor: Improve Allocation refactor: Improve AllocateTokens Oct 12, 2022
@github-actions github-actions bot added the C:x/distribution distribution module related label Oct 12, 2022
@alexanderbez alexanderbez marked this pull request as ready for review October 12, 2022 16:27
@alexanderbez alexanderbez requested a review from a team as a code owner October 12, 2022 16:27
@alexanderbez alexanderbez enabled auto-merge (squash) October 12, 2022 16:27
@alexanderbez alexanderbez added backport/0.45.x backport/0.46.x PR scheduled for inclusion in the v0.46's next stable release labels Oct 12, 2022
@codecov
Copy link

codecov bot commented Oct 12, 2022

Codecov Report

Merging #13524 (ade23cd) into main (4014953) will increase coverage by 0.13%.
The diff coverage is 100.00%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main   #13524      +/-   ##
==========================================
+ Coverage   53.78%   53.92%   +0.13%     
==========================================
  Files         653      643      -10     
  Lines       56830    55475    -1355     
==========================================
- Hits        30567    29915     -652     
+ Misses      23819    23156     -663     
+ Partials     2444     2404      -40     
Impacted Files Coverage Δ
x/distribution/keeper/allocation.go 90.78% <100.00%> (+0.93%) ⬆️
simapp/app.go
simapp/upgrades.go
simapp/state.go
simapp/simd/cmd/root.go
simapp/test_helpers.go
simapp/simd/cmd/testnet.go
simapp/genesis.go
simapp/simd/cmd/genaccounts.go
simapp/genesis_account.go
... and 3 more

Copy link
Member

@julienrbrt julienrbrt left a comment

Choose a reason for hiding this comment

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

lgtm

@alexanderbez alexanderbez merged commit 7781cdb into main Oct 12, 2022
@alexanderbez alexanderbez deleted the bez/13520-distr-patch branch October 12, 2022 20:03
mergify bot pushed a commit that referenced this pull request Oct 12, 2022
(cherry picked from commit 7781cdb)

# Conflicts:
#	x/distribution/keeper/allocation.go
mergify bot pushed a commit that referenced this pull request Oct 12, 2022
(cherry picked from commit 7781cdb)

# Conflicts:
#	x/distribution/keeper/allocation.go
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport/0.46.x PR scheduled for inclusion in the v0.46's next stable release C:x/distribution distribution module related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

distribution/AllocateTokens - inefficient computation of rewards
2 participants