Skip to content

Commit

Permalink
fix order adding in app.go
Browse files Browse the repository at this point in the history
  • Loading branch information
sunnya97 committed Jan 24, 2022
1 parent 6b8549a commit fffe5f4
Showing 1 changed file with 22 additions and 6 deletions.
28 changes: 22 additions & 6 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ import (
tmos "github.com/tendermint/tendermint/libs/os"
dbm "github.com/tendermint/tm-db"

"github.com/cosmos/cosmos-sdk/x/authz"

"github.com/cosmos/cosmos-sdk/baseapp"
"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/client/grpc/tmservice"
Expand All @@ -40,6 +38,8 @@ import (
authtx "github.com/cosmos/cosmos-sdk/x/auth/tx"
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
"github.com/cosmos/cosmos-sdk/x/auth/vesting"
vestingtypes "github.com/cosmos/cosmos-sdk/x/auth/vesting/types"
"github.com/cosmos/cosmos-sdk/x/authz"
authzkeeper "github.com/cosmos/cosmos-sdk/x/authz/keeper"
authzmodule "github.com/cosmos/cosmos-sdk/x/authz/module"
"github.com/cosmos/cosmos-sdk/x/bank"
Expand Down Expand Up @@ -361,18 +361,32 @@ func NewOsmosisApp(
// there is nothing left over in the validator fee pool, so as to keep the
// CanWithdrawInvariant invariant.
// NOTE: staking module is required if HistoricalEntries param > 0
// NOTE: capability module's beginblocker must come before any modules using capabilities (e.g. IBC)
app.mm.SetOrderBeginBlockers(
// Upgrades should be run _very_ first
upgradetypes.ModuleName,
// Note: epochs' begin should be "real" start of epochs, we keep epochs beginblock at the beginning
epochstypes.ModuleName,
minttypes.ModuleName, poolincentivestypes.ModuleName, distrtypes.ModuleName, slashingtypes.ModuleName,
evidencetypes.ModuleName, stakingtypes.ModuleName, ibchost.ModuleName, capabilitytypes.ModuleName,
capabilitytypes.ModuleName, minttypes.ModuleName,
poolincentivestypes.ModuleName,
distrtypes.ModuleName, slashingtypes.ModuleName,
evidencetypes.ModuleName, stakingtypes.ModuleName, ibchost.ModuleName, ibctransfertypes.ModuleName,
authtypes.ModuleName, banktypes.ModuleName, govtypes.ModuleName, crisistypes.ModuleName, genutiltypes.ModuleName,
authz.ModuleName,
paramstypes.ModuleName, vestingtypes.ModuleName,
gammtypes.ModuleName, incentivestypes.ModuleName, lockuptypes.ModuleName, claimtypes.ModuleName,
poolincentivestypes.ModuleName, superfluidtypes.ModuleName, bech32ibctypes.ModuleName, txfeestypes.ModuleName,
)
app.mm.SetOrderEndBlockers(
lockuptypes.ModuleName,
crisistypes.ModuleName, govtypes.ModuleName, stakingtypes.ModuleName, claimtypes.ModuleName,
authz.ModuleName,
capabilitytypes.ModuleName, authtypes.ModuleName, banktypes.ModuleName, distrtypes.ModuleName,
slashingtypes.ModuleName, minttypes.ModuleName,
genutiltypes.ModuleName, evidencetypes.ModuleName, authz.ModuleName,
paramstypes.ModuleName, upgradetypes.ModuleName, vestingtypes.ModuleName,
ibchost.ModuleName, ibctransfertypes.ModuleName,
gammtypes.ModuleName, incentivestypes.ModuleName, lockuptypes.ModuleName,
poolincentivestypes.ModuleName, superfluidtypes.ModuleName, bech32ibctypes.ModuleName, txfeestypes.ModuleName,
// Note: epochs' endblock should be "real" end of epochs, we keep epochs endblock at the end
epochstypes.ModuleName,
)
Expand All @@ -388,7 +402,9 @@ func NewOsmosisApp(
ibchost.ModuleName,
gammtypes.ModuleName,
txfeestypes.ModuleName,
genutiltypes.ModuleName, evidencetypes.ModuleName, ibctransfertypes.ModuleName,
genutiltypes.ModuleName, evidencetypes.ModuleName, authz.ModuleName,
paramstypes.ModuleName, upgradetypes.ModuleName, vestingtypes.ModuleName,
ibctransfertypes.ModuleName,
bech32ibctypes.ModuleName, // comes after ibctransfertypes
poolincentivestypes.ModuleName,
superfluidtypes.ModuleName,
Expand Down

0 comments on commit fffe5f4

Please sign in to comment.