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

Pool Incentives: Allow Zero Weight #563

Merged
merged 1 commit into from
Oct 30, 2021

Conversation

jeebster
Copy link
Contributor

@jeebster jeebster commented Oct 29, 2021

Closes: #546

Description

Validation check for pool-incentive gauge weight will only throw for negative values


For contributor use:

  • Targeted PR against correct branch (see CONTRIBUTING.md)
  • Updated relevant documentation (docs/) or specification (x/<module>/spec/)
  • Added a relevant changelog entry to the Unreleased section in CHANGELOG.md
  • Re-reviewed Files changed in the Github PR explorer

Copy link
Member

@ValarDragon ValarDragon left a comment

Choose a reason for hiding this comment

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

LGTM! Just checked in

func (k Keeper) UpdateDistrRecords(ctx sdk.Context, records ...types.DistrRecord) error {
, the Update function already correctly handles zero weights, so we should be set.

Thanks for fixing this =)

@ValarDragon
Copy link
Member

The lint issue seems unrelated, something broke on main 😕

@codecov-commenter
Copy link

Codecov Report

Merging #563 (55fe26c) into main (a2bd530) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #563   +/-   ##
=======================================
  Coverage   20.31%   20.31%           
=======================================
  Files         164      164           
  Lines       23262    23262           
=======================================
  Hits         4726     4726           
  Misses      17762    17762           
  Partials      774      774           
Impacted Files Coverage Δ
x/pool-incentives/types/record.go 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a2bd530...55fe26c. Read the comment docs.

@ValarDragon ValarDragon merged commit 954bb5c into osmosis-labs:main Oct 30, 2021
@jeebster jeebster deleted the 546-pool_incentives-zero branch October 30, 2021 17:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Cannot set incentive gauge weight to 0
3 participants