From f2fe1d6499dda74acf3a1ad81d3ad13dd8962605 Mon Sep 17 00:00:00 2001 From: MD Aleem <72057206+aleem1314@users.noreply.github.com> Date: Thu, 17 Feb 2022 17:04:03 +0530 Subject: [PATCH] chore: rename migrations v045 -> v046 (#11210) --- x/authz/keeper/migrations.go | 4 ++-- x/authz/migrations/{v045 => v046}/keys.go | 2 +- x/authz/migrations/{v045 => v046}/keys_test.go | 2 +- x/authz/migrations/{v045 => v046}/store.go | 4 ++-- x/authz/migrations/{v045 => v046}/store_test.go | 14 +++++++------- 5 files changed, 13 insertions(+), 13 deletions(-) rename x/authz/migrations/{v045 => v046}/keys.go (99%) rename x/authz/migrations/{v045 => v046}/keys_test.go (98%) rename x/authz/migrations/{v045 => v046}/store.go (95%) rename x/authz/migrations/{v045 => v046}/store_test.go (87%) diff --git a/x/authz/keeper/migrations.go b/x/authz/keeper/migrations.go index f05cbdf7b2..17b11e1039 100644 --- a/x/authz/keeper/migrations.go +++ b/x/authz/keeper/migrations.go @@ -2,7 +2,7 @@ package keeper import ( sdk "github.com/cosmos/cosmos-sdk/types" - v045 "github.com/cosmos/cosmos-sdk/x/authz/migrations/v045" + v046 "github.com/cosmos/cosmos-sdk/x/authz/migrations/v046" ) // Migrator is a struct for handling in-place store migrations. @@ -17,5 +17,5 @@ func NewMigrator(keeper Keeper) Migrator { // Migrate1to2 migrates from version 1 to 2. func (m Migrator) Migrate1to2(ctx sdk.Context) error { - return v045.MigrateStore(ctx, m.keeper.storeKey, m.keeper.cdc) + return v046.MigrateStore(ctx, m.keeper.storeKey, m.keeper.cdc) } diff --git a/x/authz/migrations/v045/keys.go b/x/authz/migrations/v046/keys.go similarity index 99% rename from x/authz/migrations/v045/keys.go rename to x/authz/migrations/v046/keys.go index 5c0356cec0..b4348df3be 100644 --- a/x/authz/migrations/v045/keys.go +++ b/x/authz/migrations/v046/keys.go @@ -1,4 +1,4 @@ -package v045 +package v046 import ( "time" diff --git a/x/authz/migrations/v045/keys_test.go b/x/authz/migrations/v046/keys_test.go similarity index 98% rename from x/authz/migrations/v045/keys_test.go rename to x/authz/migrations/v046/keys_test.go index d19d294a1d..05a5bd6b1b 100644 --- a/x/authz/migrations/v045/keys_test.go +++ b/x/authz/migrations/v046/keys_test.go @@ -1,4 +1,4 @@ -package v045 +package v046 import ( "testing" diff --git a/x/authz/migrations/v045/store.go b/x/authz/migrations/v046/store.go similarity index 95% rename from x/authz/migrations/v045/store.go rename to x/authz/migrations/v046/store.go index 7fb4638e0a..4db5649b89 100644 --- a/x/authz/migrations/v045/store.go +++ b/x/authz/migrations/v046/store.go @@ -1,4 +1,4 @@ -package v045 +package v046 import ( "github.com/cosmos/cosmos-sdk/codec" @@ -9,7 +9,7 @@ import ( "github.com/cosmos/cosmos-sdk/x/authz" ) -// MigrateStore performs in-place store migrations from v0.44 to v0.45. The +// MigrateStore performs in-place store migrations from v0.45 to v0.46. The // migration includes: // // - pruning expired authorizations diff --git a/x/authz/migrations/v045/store_test.go b/x/authz/migrations/v046/store_test.go similarity index 87% rename from x/authz/migrations/v045/store_test.go rename to x/authz/migrations/v046/store_test.go index e86eb694a7..8067a6d1d3 100644 --- a/x/authz/migrations/v045/store_test.go +++ b/x/authz/migrations/v046/store_test.go @@ -1,4 +1,4 @@ -package v045_test +package v046_test import ( "testing" @@ -10,7 +10,7 @@ import ( "github.com/cosmos/cosmos-sdk/testutil" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/authz" - v045 "github.com/cosmos/cosmos-sdk/x/authz/migrations/v045" + v046 "github.com/cosmos/cosmos-sdk/x/authz/migrations/v046" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" "github.com/stretchr/testify/require" @@ -95,13 +95,13 @@ func TestMigration(t *testing.T) { for _, g := range grants { grant := g.authorization() - store.Set(v045.GrantStoreKey(g.grantee, g.granter, g.msgType), cdc.MustMarshal(&grant)) + store.Set(v046.GrantStoreKey(g.grantee, g.granter, g.msgType), cdc.MustMarshal(&grant)) } ctx = ctx.WithBlockTime(ctx.BlockTime().Add(1 * time.Hour)) - require.NoError(t, v045.MigrateStore(ctx, authzKey, cdc)) + require.NoError(t, v046.MigrateStore(ctx, authzKey, cdc)) - require.NotNil(t, store.Get(v045.GrantStoreKey(grantee1, granter2, genericMsgType))) - require.NotNil(t, store.Get(v045.GrantStoreKey(grantee1, granter1, sendMsgType))) - require.Nil(t, store.Get(v045.GrantStoreKey(grantee2, granter2, genericMsgType))) + require.NotNil(t, store.Get(v046.GrantStoreKey(grantee1, granter2, genericMsgType))) + require.NotNil(t, store.Get(v046.GrantStoreKey(grantee1, granter1, sendMsgType))) + require.Nil(t, store.Get(v046.GrantStoreKey(grantee2, granter2, genericMsgType))) }