Skip to content

Commit

Permalink
add upgrade plan handler
Browse files Browse the repository at this point in the history
  • Loading branch information
jhernandezb committed Mar 30, 2021
1 parent fe73fad commit ea75070
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,7 @@ func NewStargazeApp(
app.GetSubspace(crisistypes.ModuleName), invCheckPeriod, app.BankKeeper, authtypes.FeeCollectorName,
)
app.UpgradeKeeper = upgradekeeper.NewKeeper(skipUpgradeHeights, keys[upgradetypes.StoreKey], appCodec, homePath)
app.registerUpgradeHandlers()

// register the proposal types
govRouter := govtypes.NewRouter()
Expand Down Expand Up @@ -405,7 +406,7 @@ func NewStargazeApp(
app.FaucetKeeper = faucet.NewKeeper(appCodec, keys[faucet.StoreKey],
app.BankKeeper,
app.StakingKeeper,
10*1_000_000, // amount for mint
20*1_000_000, // amount for mint
config,
24*time.Hour, // rate limit by time
)
Expand Down Expand Up @@ -725,6 +726,12 @@ func (app *StargazeApp) RegisterTendermintService(clientCtx client.Context) {
tmservice.RegisterTendermintService(app.BaseApp.GRPCQueryRouter(), clientCtx, app.interfaceRegistry)
}

func (app *StargazeApp) registerUpgradeHandlers() {
app.UpgradeKeeper.SetUpgradeHandler("nebula", func(ctx sdk.Context, plan upgradetypes.Plan) {
// no-op
})
}

// RegisterSwaggerAPI registers swagger route with API Server
func RegisterSwaggerAPI(ctx client.Context, rtr *mux.Router) {
statikFS, err := fs.New()
Expand Down

0 comments on commit ea75070

Please sign in to comment.