Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: references all modules in SetOrder* functions #66

Merged
merged 2 commits into from
May 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ linters:
- sqlclosecheck
- stylecheck
- tenv
- testpackage
- tparallel
- unconvert
- unparam
Expand Down
46 changes: 43 additions & 3 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ 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/bank"
bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper"
banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"
Expand Down Expand Up @@ -411,12 +412,47 @@ func New(
// CanWithdrawInvariant invariant.
// NOTE: staking module is required if HistoricalEntries param > 0
app.mm.SetOrderBeginBlockers(
upgradetypes.ModuleName, capabilitytypes.ModuleName, minttypes.ModuleName, distrtypes.ModuleName, slashingtypes.ModuleName,
evidencetypes.ModuleName, stakingtypes.ModuleName, ibchost.ModuleName,
upgradetypes.ModuleName,
capabilitytypes.ModuleName,
minttypes.ModuleName,
distrtypes.ModuleName,
slashingtypes.ModuleName,
evidencetypes.ModuleName,
stakingtypes.ModuleName,
ibchost.ModuleName,
feegrant.ModuleName,
knowledgemoduletypes.ModuleName,
genutiltypes.ModuleName,
banktypes.ModuleName,
crisistypes.ModuleName,
ibctransfertypes.ModuleName,
govtypes.ModuleName,
authtypes.ModuleName,
paramstypes.ModuleName,
authtypes.ModuleName,
vestingtypes.ModuleName,
)

app.mm.SetOrderEndBlockers(crisistypes.ModuleName, govtypes.ModuleName, stakingtypes.ModuleName)
app.mm.SetOrderEndBlockers(
crisistypes.ModuleName,
govtypes.ModuleName,
stakingtypes.ModuleName,
distrtypes.ModuleName,
upgradetypes.ModuleName,
ibctransfertypes.ModuleName,
knowledgemoduletypes.ModuleName,
capabilitytypes.ModuleName,
feegrant.ModuleName,
evidencetypes.ModuleName,
ibchost.ModuleName,
vestingtypes.ModuleName,
minttypes.ModuleName,
slashingtypes.ModuleName,
genutiltypes.ModuleName,
authtypes.ModuleName,
paramstypes.ModuleName,
banktypes.ModuleName,
)

// NOTE: The genutils module must occur after staking so that pools are
// properly initialized with tokens from genesis accounts.
Expand All @@ -438,6 +474,10 @@ func New(
evidencetypes.ModuleName,
ibctransfertypes.ModuleName,
knowledgemoduletypes.ModuleName,
vestingtypes.ModuleName,
paramstypes.ModuleName,
upgradetypes.ModuleName,
feegrant.ModuleName,
// this line is used by starport scaffolding # stargate/app/initGenesis
)

Expand Down
4 changes: 2 additions & 2 deletions x/knowledge/client/cli/tx_trigger_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ func CmdTriggerService() *cobra.Command {
Short: "Trigger a service execution from an invocation URI",
Args: cobra.ExactArgs(1),
RunE: func(cmd *cobra.Command, args []string) (err error) {
argUri := args[0]
argURI := args[0]

clientCtx, err := client.GetClientTxContext(cmd)
if err != nil {
Expand All @@ -27,7 +27,7 @@ func CmdTriggerService() *cobra.Command {

msg := types.NewMsgTriggerService(
clientCtx.GetFromAddress().String(),
argUri,
argURI,
)
if err := msg.ValidateBasic(); err != nil {
return err
Expand Down
1 change: 1 addition & 0 deletions x/knowledge/module_simulation.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ const (
// TODO: Determine the simulation weight value
defaultWeightMsgBangDataspace int = 100

//nolint:gosec
opWeightMsgTriggerService = "op_weight_msg_create_chain"
// TODO: Determine the simulation weight value
defaultWeightMsgTriggerService int = 100
Expand Down