-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5d733e9
commit 7d22cba
Showing
48 changed files
with
3,288 additions
and
76 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
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
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,32 @@ | ||
package v02 | ||
|
||
import ( | ||
"context" | ||
"fmt" | ||
|
||
upgradetypes "cosmossdk.io/x/upgrade/types" | ||
"github.com/cosmos/cosmos-sdk/baseapp" | ||
sdk "github.com/cosmos/cosmos-sdk/types" | ||
"github.com/cosmos/cosmos-sdk/types/module" | ||
consensuskeeper "github.com/cosmos/cosmos-sdk/x/consensus/keeper" | ||
paramskeeper "github.com/cosmos/cosmos-sdk/x/params/keeper" | ||
paramstypes "github.com/cosmos/cosmos-sdk/x/params/types" | ||
ibcclientkeeper "github.com/cosmos/ibc-go/v8/modules/core/02-client/keeper" | ||
) | ||
|
||
const Name = "0.1-to-0.2" | ||
|
||
func UpgradeHandler(mm *module.Manager, configurator module.Configurator, paramsKeeper paramskeeper.Keeper, consensusKeeper *consensuskeeper.Keeper, clientKeeper ibcclientkeeper.Keeper, baseAppLegacySS paramstypes.Subspace) upgradetypes.UpgradeHandler { | ||
return func(ctx context.Context, _ upgradetypes.Plan, vm module.VersionMap) (module.VersionMap, error) { | ||
sdkCtx := sdk.UnwrapSDKContext(ctx) | ||
cp := baseapp.GetConsensusParams(sdkCtx, baseAppLegacySS) | ||
if cp == nil { | ||
return nil, fmt.Errorf("consensus parameters are undefined") | ||
} | ||
err := consensusKeeper.ParamsStore.Set(ctx, *cp) | ||
if err != nil { | ||
return nil, fmt.Errorf("failed to set consensus params: %w", err) | ||
} | ||
return mm.RunMigrations(ctx, configurator, vm) | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.