diff --git a/x/ccv/consumer/keeper/migration.go b/x/ccv/consumer/keeper/migration.go index be22cbe4b8..31dd31f776 100644 --- a/x/ccv/consumer/keeper/migration.go +++ b/x/ccv/consumer/keeper/migration.go @@ -21,16 +21,16 @@ func NewMigrator(ccvConsumerKeeper Keeper, ccvConsumerParamSpace paramtypes.Subs return Migrator{ccvConsumerKeeper: ccvConsumerKeeper, ccvConsumerParamSpace: ccvConsumerParamSpace} } -func (m Migrator) Migratev1p0To1p3(ctx sdk.Context) error { +func (m Migrator) Migratev1Tov2(ctx sdk.Context) error { // Migrate params - MigrateParamsv1p0To1p3(ctx, m.ccvConsumerParamSpace) + MigrateParamsv1Tov2(ctx, m.ccvConsumerParamSpace) return nil } -// MigrateParamsv1p0To1p3 migrates the consumer CCV module params from v1.0.0 to v1.3.0, +// MigrateParamsv1Tov2 migrates the consumer CCV module params from v1.0.0 to v2.0.0, // setting default values for new params. -func MigrateParamsv1p0To1p3(ctx sdk.Context, paramsSubspace paramtypes.Subspace) { +func MigrateParamsv1Tov2(ctx sdk.Context, paramsSubspace paramtypes.Subspace) { // Get old params var enabled bool paramsSubspace.Get(ctx, v1consumertypes.KeyEnabled, &enabled) diff --git a/x/ccv/consumer/keeper/migration_test.go b/x/ccv/consumer/keeper/migration_test.go index 75b814e255..9b42457176 100644 --- a/x/ccv/consumer/keeper/migration_test.go +++ b/x/ccv/consumer/keeper/migration_test.go @@ -20,7 +20,7 @@ import ( tmdb "github.com/tendermint/tm-db" ) -func TestMigrateParamsv1p0To1p3(t *testing.T) { +func TestMigrateParamsv1Tov2(t *testing.T) { // Setup raw store db := tmdb.NewMemDB() stateStore := store.NewCommitMultiStore(db) @@ -76,7 +76,7 @@ func TestMigrateParamsv1p0To1p3(t *testing.T) { ).WithKeyTable(v2consumertypes.ParamKeyTable()) // Use v2 key table, this would be set in keeper constructor upon app init // Run migration - v2consumerkeeper.MigrateParamsv1p0To1p3(ctx, subspace) + v2consumerkeeper.MigrateParamsv1Tov2(ctx, subspace) // Use v2 keeper to confirm params are set correctly keeper := v2consumerkeeper.Keeper{} diff --git a/x/ccv/provider/keeper/migration.go b/x/ccv/provider/keeper/migration.go index 9b83478cdf..281e898914 100644 --- a/x/ccv/provider/keeper/migration.go +++ b/x/ccv/provider/keeper/migration.go @@ -25,9 +25,9 @@ func NewMigrator(ccvProviderKeeper Keeper, stakingKeeper v2ccvtypes.StakingKeepe return Migrator{ccvProviderKeeper: ccvProviderKeeper, ccvProviderParamSpace: ccvProviderParamSpace} } -func (m Migrator) Migratev1p0To1p3(ctx sdk.Context) error { +func (m Migrator) Migratev1Tov2(ctx sdk.Context) error { // Migrate params - MigrateParamsv1p0To1p3(ctx, + MigrateParamsv1Tov2(ctx, m.ccvProviderParamSpace, // See https://github.com/cosmos/interchain-security/blob/7861804cb311507ec6aebebbfad60ea42eb8ed4b/x/ccv/provider/keeper/params.go#L84 // The v1.1.0-multiden version of ICS hardcodes this param as 10 of bond type: k.stakingKeeper.BondDenom(ctx). @@ -38,9 +38,9 @@ func (m Migrator) Migratev1p0To1p3(ctx sdk.Context) error { return nil } -// MigrateParamsv1p0To1p3 migrates the provider CCV module params from v1.0.0 to v1.3.0, +// MigrateParamsv1Tov2 migrates the provider CCV module params from v1.0.0 to v2.0.0, // setting default values for new params. -func MigrateParamsv1p0To1p3(ctx sdk.Context, paramsSubspace paramtypes.Subspace, consumerRewardDenomRegistrationFee sdk.Coin) { +func MigrateParamsv1Tov2(ctx sdk.Context, paramsSubspace paramtypes.Subspace, consumerRewardDenomRegistrationFee sdk.Coin) { // Get old params var templateClient ibctmtypes.ClientState paramsSubspace.Get(ctx, v1providertypes.KeyTemplateClient, &templateClient) diff --git a/x/ccv/provider/keeper/migration_test.go b/x/ccv/provider/keeper/migration_test.go index 66f238d6ad..3043cdf6c9 100644 --- a/x/ccv/provider/keeper/migration_test.go +++ b/x/ccv/provider/keeper/migration_test.go @@ -20,7 +20,7 @@ import ( tmdb "github.com/tendermint/tm-db" ) -func TestMigrateParamsv1p0To1p3(t *testing.T) { +func TestMigrateParamsv1Tov2(t *testing.T) { // Setup raw store db := tmdb.NewMemDB() stateStore := store.NewCommitMultiStore(db) @@ -69,7 +69,7 @@ func TestMigrateParamsv1p0To1p3(t *testing.T) { ).WithKeyTable(v2providertypes.ParamKeyTable()) // Use v2 key table, this would be set in keeper constructor upon app init // Run migration - v2providerkeeper.MigrateParamsv1p0To1p3(ctx, subspace, sdk.NewCoin("uatom", sdk.NewInt(100000))) + v2providerkeeper.MigrateParamsv1Tov2(ctx, subspace, sdk.NewCoin("uatom", sdk.NewInt(100000))) // Use keeper to confirm params are set correctly keeper := v2providerkeeper.Keeper{}