Skip to content

Commit

Permalink
remove unused param
Browse files Browse the repository at this point in the history
  • Loading branch information
jgimeno committed Sep 20, 2023
1 parent 89a6920 commit 64dfa4a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
5 changes: 3 additions & 2 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@ package app
import (
"encoding/json"
"fmt"
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"
"io"
"net/http"
"os"
"path/filepath"

upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"

"github.com/NibiruChain/nibiru/app/upgrades"

"github.com/NibiruChain/nibiru/x/genmsg"
Expand Down Expand Up @@ -473,7 +474,7 @@ func (app *NibiruApp) setupUpgradeHandlers() {
for _, u := range Upgrades {
app.upgradeKeeper.SetUpgradeHandler(
u.UpgradeName,
u.CreateUpgradeHandler(app.mm, app.configurator, app.BaseApp),
u.CreateUpgradeHandler(app.mm, app.configurator),
)
}
}
Expand Down
10 changes: 2 additions & 8 deletions app/upgrades/upgrades.go
Original file line number Diff line number Diff line change
@@ -1,27 +1,21 @@
package upgrades

import (
tmproto "github.com/cometbft/cometbft/proto/tendermint/types"
"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"
)

func emptyUpgradeHandler(mm *module.Manager, configurator module.Configurator, _ BaseAppParamManager) upgradetypes.UpgradeHandler {
func emptyUpgradeHandler(mm *module.Manager, configurator module.Configurator) upgradetypes.UpgradeHandler {
return func(ctx sdk.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) {
return mm.RunMigrations(ctx, configurator, fromVM)
}
}

type BaseAppParamManager interface {
GetConsensusParams(ctx sdk.Context) *tmproto.ConsensusParams
StoreConsensusParams(ctx sdk.Context, cp *tmproto.ConsensusParams)
}

type Upgrade struct {
UpgradeName string
CreateUpgradeHandler func(*module.Manager, module.Configurator, BaseAppParamManager) upgradetypes.UpgradeHandler
CreateUpgradeHandler func(*module.Manager, module.Configurator) upgradetypes.UpgradeHandler
StoreUpgrades types.StoreUpgrades
}

Expand Down

0 comments on commit 64dfa4a

Please sign in to comment.