Skip to content

Pool Incentives: Allow Zero Weight#563

Merged
ValarDragon merged 1 commit intoosmosis-labs:mainfrom
jeebster:546-pool_incentives-zero
Oct 30, 2021
Merged

Pool Incentives: Allow Zero Weight#563
ValarDragon merged 1 commit intoosmosis-labs:mainfrom
jeebster:546-pool_incentives-zero

Conversation

@jeebster
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Member

The lint issue seems unrelated, something broke on main 😕

@codecov-commenter
Copy link
Copy Markdown

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.

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