Skip to content

Commit

Permalink
add handler (#265)
Browse files Browse the repository at this point in the history
  • Loading branch information
anilcse authored Feb 17, 2021
1 parent d19b384 commit 0df70a6
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
1 change: 1 addition & 0 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,7 @@ func NewRegenApp(logger log.Logger, db dbm.DB, traceStore io.Writer, loadLatest
)

app.UpgradeKeeper = upgradekeeper.NewKeeper(skipUpgradeHeights, keys[upgradetypes.StoreKey], appCodec, homePath)
app.registerUpgradeHandlers()

// register the staking hooks
// NOTE: stakingKeeper above is passed by reference, so that it will contain these hooks
Expand Down
8 changes: 8 additions & 0 deletions app/experimental_appconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ package app
import (
"github.com/cosmos/cosmos-sdk/codec"
"github.com/cosmos/cosmos-sdk/codec/types"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/module"
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"

moduletypes "github.com/regen-network/regen-ledger/types/module"
servermodule "github.com/regen-network/regen-ledger/types/module/server"
Expand Down Expand Up @@ -47,3 +49,9 @@ func setCustomModules(app *RegenApp, interfaceRegistry types.InterfaceRegistry)
}
/* New Module Wiring END */
}

func (app *RegenApp) registerUpgradeHandlers() {
app.UpgradeKeeper.SetUpgradeHandler("Gir", func(ctx sdk.Context, plan upgradetypes.Plan) {
// no-op handler, does nothing
})
}
4 changes: 2 additions & 2 deletions app/stable_appconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ func setCustomModuleBasics() []module.AppModuleBasic {
return []module.AppModuleBasic{}
}

func setCustomModules(app *RegenApp, interfaceRegistry types.InterfaceRegistry) {
func setCustomModules(app *RegenApp, interfaceRegistry types.InterfaceRegistry) {}

}
func (app *RegenApp) registerUpgradeHandlers() {}

0 comments on commit 0df70a6

Please sign in to comment.