-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #140 from realiotech/feat/sdk-47
Feat/sdk 47
- Loading branch information
Showing
2 changed files
with
33 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package keeper | ||
|
||
import ( | ||
sdk "github.com/cosmos/cosmos-sdk/types" | ||
"github.com/cosmos/cosmos-sdk/x/staking/exported" | ||
stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" | ||
) | ||
|
||
// Migrator is a struct for handling in-place store migrations. | ||
type Migrator struct { | ||
stkm stakingkeeper.Migrator | ||
} | ||
|
||
// NewMigrator returns a new Migrator. | ||
func NewMigrator(keeper *stakingkeeper.Keeper, legacySubspace exported.Subspace) Migrator { | ||
return Migrator{ | ||
stkm: stakingkeeper.NewMigrator(keeper, legacySubspace), | ||
} | ||
} | ||
|
||
// Migrate1to2 migrates multi-staking state from consensus version 1 to 2. (sdk46 to sdk47) | ||
func (m Migrator) Migrate1to2(ctx sdk.Context) error { | ||
return m.stkm.Migrate3to4(ctx) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters