Skip to content

Commit

Permalink
chore: try fix migration
Browse files Browse the repository at this point in the history
  • Loading branch information
kioqq committed Dec 11, 2023
1 parent a4c7c17 commit a58b0c0
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions app/upgrades/v1.6.4/upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,18 @@ func CreateUpgradeHandler(

logger.Info("start cleaning params for module")

paramsSubspace.SetParamSet(ctx, nil)
paramsSubspace.Set(ctx, []byte(ModuleName), nil) // Получаем пространство параметров для модуля
if paramsSubspace.HasKeyTable() {
paramsSubspace.IterateKeys(ctx, func(key []byte) bool {
paramsSubspace.Update(ctx, key, nil)
return false
})
}

// if !ps.HasKeyTable() {
// ps = ps.WithKeyTable(types.ParamKeyTable())
// }

// paramsSubspace.Set(ctx, []byte(ModuleName), nil) // Получаем пространство параметров для модуля
// iter := storeParams.Iterator(nil, nil) // Создаем итератор для всех ключей
// defer iter.Close()

Expand Down

0 comments on commit a58b0c0

Please sign in to comment.