-
Notifications
You must be signed in to change notification settings - Fork 213
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(upgrades): network upgrade v0.30.0 (#1906)
Signed-off-by: Artur Troian <troian.ap@gmail.com>
- Loading branch information
Showing
9 changed files
with
74 additions
and
10 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
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,2 @@ | ||
{ | ||
} |
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,11 @@ | ||
// Package v0_30_0 | ||
// nolint revive | ||
package v0_30_0 | ||
|
||
import ( | ||
utypes "github.com/akash-network/node/upgrades/types" | ||
) | ||
|
||
func init() { | ||
utypes.RegisterUpgrade(UpgradeName, initUpgrade) | ||
} |
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,47 @@ | ||
// Package v0_30_0 | ||
// nolint revive | ||
package v0_30_0 | ||
|
||
import ( | ||
"fmt" | ||
|
||
"github.com/tendermint/tendermint/libs/log" | ||
|
||
storetypes "github.com/cosmos/cosmos-sdk/store/types" | ||
sdk "github.com/cosmos/cosmos-sdk/types" | ||
"github.com/cosmos/cosmos-sdk/types/module" | ||
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" | ||
|
||
apptypes "github.com/akash-network/node/app/types" | ||
utypes "github.com/akash-network/node/upgrades/types" | ||
) | ||
|
||
const ( | ||
UpgradeName = "v0.30.0" | ||
) | ||
|
||
type upgrade struct { | ||
*apptypes.App | ||
log log.Logger | ||
} | ||
|
||
var _ utypes.IUpgrade = (*upgrade)(nil) | ||
|
||
func initUpgrade(log log.Logger, app *apptypes.App) (utypes.IUpgrade, error) { | ||
up := &upgrade{ | ||
App: app, | ||
log: log.With("module", fmt.Sprintf("upgrade/%s", UpgradeName)), | ||
} | ||
|
||
return up, nil | ||
} | ||
|
||
func (up *upgrade) StoreLoader() *storetypes.StoreUpgrades { | ||
return &storetypes.StoreUpgrades{} | ||
} | ||
|
||
func (up *upgrade) UpgradeHandler() upgradetypes.UpgradeHandler { | ||
return func(ctx sdk.Context, _ upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { | ||
return up.MM.RunMigrations(ctx, up.Configurator, fromVM) | ||
} | ||
} |
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