Skip to content

Commit

Permalink
chore: Rename v044 migrations to v045 (#10260)
Browse files Browse the repository at this point in the history
* chore: Rename v044 migrations to v045

* Fix build
  • Loading branch information
amaury1093 authored Sep 29, 2021
1 parent c65df60 commit 1e2ef52
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions x/bank/keeper/migrations.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package keeper
import (
sdk "github.com/cosmos/cosmos-sdk/types"
v043 "github.com/cosmos/cosmos-sdk/x/bank/migrations/v043"
v044 "github.com/cosmos/cosmos-sdk/x/bank/migrations/v044"
v045 "github.com/cosmos/cosmos-sdk/x/bank/migrations/v045"
)

// Migrator is a struct for handling in-place store migrations.
Expand All @@ -23,5 +23,5 @@ func (m Migrator) Migrate1to2(ctx sdk.Context) error {

// Migrate2to3 migrates x/bank storage from version 2 to 3.
func (m Migrator) Migrate2to3(ctx sdk.Context) error {
return v044.MigrateStore(ctx, m.keeper.storeKey, m.keeper.cdc)
return v045.MigrateStore(ctx, m.keeper.storeKey, m.keeper.cdc)
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package v044
package v045

var (
DenomAddressPrefix = []byte{0x03}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package v044
package v045

import (
"github.com/cosmos/cosmos-sdk/codec"
Expand All @@ -9,7 +9,7 @@ import (
"github.com/cosmos/cosmos-sdk/x/bank/types"
)

// MigrateStore performs in-place store migrations from v0.43 to v0.44. The
// MigrateStore performs in-place store migrations from v0.43 to v0.45. The
// migration includes:
//
// - Migrate coin storage to save only amount.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package v044_test
package v045_test

import (
"testing"
Expand All @@ -11,7 +11,7 @@ import (
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/address"
v043 "github.com/cosmos/cosmos-sdk/x/bank/migrations/v043"
v044 "github.com/cosmos/cosmos-sdk/x/bank/migrations/v044"
v045 "github.com/cosmos/cosmos-sdk/x/bank/migrations/v045"
"github.com/cosmos/cosmos-sdk/x/bank/types"
)

Expand All @@ -36,7 +36,7 @@ func TestMigrateStore(t *testing.T) {
prefixAccStore.Set([]byte(b.Denom), bz)
}

require.NoError(t, v044.MigrateStore(ctx, bankKey, encCfg.Codec))
require.NoError(t, v045.MigrateStore(ctx, bankKey, encCfg.Codec))

for _, b := range balances {
addrPrefixStore := prefix.NewStore(store, types.CreateAccountBalancesPrefix(addr))
Expand All @@ -47,7 +47,7 @@ func TestMigrateStore(t *testing.T) {
}

for _, b := range balances {
denomPrefixStore := prefix.NewStore(store, v044.CreateDenomAddressPrefix(b.Denom))
denomPrefixStore := prefix.NewStore(store, v045.CreateDenomAddressPrefix(b.Denom))
bz := denomPrefixStore.Get(address.MustLengthPrefix(addr))
require.NotNil(t, bz)
}
Expand Down Expand Up @@ -95,7 +95,7 @@ func TestMigrateDenomMetaData(t *testing.T) {
denomMetadataStore.Set(key, bz)
}

require.NoError(t, v044.MigrateStore(ctx, bankKey, encCfg.Codec))
require.NoError(t, v045.MigrateStore(ctx, bankKey, encCfg.Codec))

denomMetadataStore = prefix.NewStore(store, v043.DenomMetadataPrefix)
denomMetadataIter := denomMetadataStore.Iterator(nil, nil)
Expand Down

0 comments on commit 1e2ef52

Please sign in to comment.