Skip to content

Commit

Permalink
fix: slash window progress reset (#1471)
Browse files Browse the repository at this point in the history
## Description

Fixes an issue where the slash window progress doesn't reset at the end of the slashing window

---

### 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](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
- [ ] added `!` to the type prefix if API or client breaking change
- [ ] added appropriate labels to the PR
- [ ] targeted the correct branch (see [PR Targeting](https://github.com/umee-network/umee/blob/main/CONTRIBUTING.md#pr-targeting))
- [ ] provided a link to the relevant issue or specification
- [ ] added a changelog entry to `CHANGELOG.md`
- [ ] included comments for [documenting Go code](https://blog.golang.org/godoc)
- [ ] 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](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
- [ ] 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)
  • Loading branch information
adamewozniak authored Oct 7, 2022
1 parent 4519faf commit ed8e069
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ Ref: https://keepachangelog.com/en/1.0.0/

## [Unreleased]

### Fixes

- [1471](https://github.com/umee-network/umee/pull/1471) Fix slash window progress query.

## [v3.0.2](https://github.com/umee-network/umee/releases/tag/v3.0.2) - 2022-09-29

### Fixes
Expand Down
4 changes: 2 additions & 2 deletions x/oracle/keeper/grpc_query.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,8 @@ func (q querier) SlashWindow(
params := q.GetParams(ctx)

return &types.QuerySlashWindowResponse{
WindowProgress: (uint64(ctx.BlockHeight()) / params.VotePeriod) %
params.SlashWindow,
WindowProgress: (uint64(ctx.BlockHeight()) % params.SlashWindow) /
params.VotePeriod,
}, nil
}

Expand Down

0 comments on commit ed8e069

Please sign in to comment.