Co-authored-by: Anil Kumar Kammari <anil@vitwit.com>
Co-authored-by: Cory <cjlevinson@gmail.com>
This commit is contained in:
MD Aleem 2021-06-10 20:53:20 +05:30 committed by GitHub
parent 745154aec0
commit 606bb2f46d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 2 deletions

View File

@ -56,8 +56,12 @@ func migrateValidatorsByPowerIndexKey(store sdk.KVStore) {
}
func migrateParamsStore(ctx sdk.Context, paramstore paramtypes.Subspace) {
paramstore.WithKeyTable(types.ParamKeyTable())
paramstore.Set(ctx, types.KeyPowerReduction, sdk.DefaultPowerReduction)
if paramstore.HasKeyTable() {
paramstore.Set(ctx, types.KeyPowerReduction, sdk.DefaultPowerReduction)
} else {
paramstore.WithKeyTable(types.ParamKeyTable())
paramstore.Set(ctx, types.KeyPowerReduction, sdk.DefaultPowerReduction)
}
}
// MigrateStore performs in-place store migrations from v0.40 to v0.43. The