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

fix(poolincentives): band-aid state export fix for cwpool gauges #6476

Merged
merged 2 commits into from
Sep 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Misc Improvements

* [#6309](https://github.com/osmosis-labs/osmosis/pull/6309) Add Cosmwasm Pool Queries to Stargate Query
* [#6476](https://github.com/osmosis-labs/osmosis/pull/6476) band-aid state export fix for cwpool gauges

### State Breaking

Expand Down
10 changes: 10 additions & 0 deletions x/pool-incentives/keeper/genesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,19 @@ func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState {
if err != nil {
panic(err)
}

if pool.GetType() == poolmanagertypes.CosmWasm {
// TODO: remove this post-v19. In v19 we did not create a hook for cw pool gauges.
// Fix tracked in:
// https://github.com/osmosis-labs/osmosis/issues/6122
ctx.Logger().Info("Skipping pool ID", "poolId", poolId, "reason", "cosmwasm pool")
continue
}

isCLPool := pool.GetType() == poolmanagertypes.Concentrated
if isCLPool {
incParams := k.incentivesKeeper.GetEpochInfo(ctx)

gaugeID, err := k.GetPoolGaugeId(ctx, uint64(poolId), incParams.Duration)
if err != nil {
panic(err)
Expand Down