Skip to content

Commit

Permalink
chore: remove crisis module from begin blockers (#3593)
Browse files Browse the repository at this point in the history
* chore: remove crisis module from begin blockers

Also move crisis module creation from the bottom of the constructor call
because it seems there is no need for it to be created last.

* chore: update changelog

* docs: correct `v0.27.1` migration docs
  • Loading branch information
jeronimoalbi authored Jul 25, 2023
1 parent a991ee2 commit 1fd3bae
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 10 deletions.
1 change: 1 addition & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
- [#3581](https://github.com/ignite/cli/pull/3581) Bump cometbft and cometbft-db in the template
- [#3559](https://github.com/ignite/cli/pull/3559) Bump network plugin version to `v0.1.1`
- [#3522](https://github.com/ignite/cli/pull/3522) Remove indentation from `chain serve` output
- [#3593](https://github.com/ignite/cli/pull/3593) Remove crisis module from begin blockers in app template

## [`v0.27.0`](https://github.com/ignite/cli/releases/tag/v0.27.0)

Expand Down
5 changes: 1 addition & 4 deletions docs/docs/06-migration/v0.27.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,7 @@ func New(
staking.NewAppModule(appCodec, app.StakingKeeper, app.AccountKeeper, app.BankKeeper),
// remove-end
// highlight-start
crisis.NewAppModule(app.CrisisKeeper, skipGenesisInvariants, app.GetSubspace(crisistypes.ModuleName)),
gov.NewAppModule(appCodec, &app.GovKeeper, app.AccountKeeper, app.BankKeeper, app.GetSubspace(govtypes.ModuleName)),
mint.NewAppModule(appCodec, app.MintKeeper, app.AccountKeeper, nil, app.GetSubspace(minttypes.ModuleName)),
slashing.NewAppModule(appCodec, app.SlashingKeeper, app.AccountKeeper, app.BankKeeper, app.StakingKeeper, app.GetSubspace(slashingtypes.ModuleName)),
Expand All @@ -437,10 +438,6 @@ func New(
icaModule,
// this line is used by starport scaffolding # stargate/app/appModule

// highlight-start
// always be last to make sure that it checks for all invariants and not only part of them
crisis.NewAppModule(app.CrisisKeeper, skipGenesisInvariants, app.GetSubspace(crisistypes.ModuleName)),
// highlight-end
)

app.mm.SetOrderBeginBlockers(
Expand Down
5 changes: 1 addition & 4 deletions docs/versioned_docs/version-v0.27.1/06-migration/v0.27.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,7 @@ func New(
staking.NewAppModule(appCodec, app.StakingKeeper, app.AccountKeeper, app.BankKeeper),
// remove-end
// highlight-start
crisis.NewAppModule(app.CrisisKeeper, skipGenesisInvariants, app.GetSubspace(crisistypes.ModuleName)),
gov.NewAppModule(appCodec, &app.GovKeeper, app.AccountKeeper, app.BankKeeper, app.GetSubspace(govtypes.ModuleName)),
mint.NewAppModule(appCodec, app.MintKeeper, app.AccountKeeper, nil, app.GetSubspace(minttypes.ModuleName)),
slashing.NewAppModule(appCodec, app.SlashingKeeper, app.AccountKeeper, app.BankKeeper, app.StakingKeeper, app.GetSubspace(slashingtypes.ModuleName)),
Expand All @@ -437,10 +438,6 @@ func New(
icaModule,
// this line is used by starport scaffolding # stargate/app/appModule

// highlight-start
// always be last to make sure that it checks for all invariants and not only part of them
crisis.NewAppModule(app.CrisisKeeper, skipGenesisInvariants, app.GetSubspace(crisistypes.ModuleName)),
// highlight-end
)

app.mm.SetOrderBeginBlockers(
Expand Down
3 changes: 1 addition & 2 deletions ignite/templates/app/files/app/app.go.plush
Original file line number Diff line number Diff line change
Expand Up @@ -560,6 +560,7 @@ func New(
vesting.NewAppModule(app.AccountKeeper, app.BankKeeper),
bank.NewAppModule(appCodec, app.BankKeeper, app.AccountKeeper, app.GetSubspace(banktypes.ModuleName)),
capability.NewAppModule(appCodec, *app.CapabilityKeeper, false),
crisis.NewAppModule(app.CrisisKeeper, skipGenesisInvariants, app.GetSubspace(crisistypes.ModuleName)),
feegrantmodule.NewAppModule(appCodec, app.AccountKeeper, app.BankKeeper, app.FeeGrantKeeper, app.interfaceRegistry),
groupmodule.NewAppModule(appCodec, app.GroupKeeper, app.AccountKeeper, app.BankKeeper, app.interfaceRegistry),
gov.NewAppModule(appCodec, &app.GovKeeper, app.AccountKeeper, app.BankKeeper, app.GetSubspace(govtypes.ModuleName)),
Expand All @@ -576,7 +577,6 @@ func New(
icaModule,
// this line is used by starport scaffolding # stargate/app/appModule

crisis.NewAppModule(app.CrisisKeeper, skipGenesisInvariants, app.GetSubspace(crisistypes.ModuleName)), // always be last to make sure that it checks for all invariants and not only part of them
)

// During begin block slashing happens after distr.BeginBlocker so that
Expand All @@ -595,7 +595,6 @@ func New(
authtypes.ModuleName,
banktypes.ModuleName,
govtypes.ModuleName,
crisistypes.ModuleName,
ibctransfertypes.ModuleName,
ibcexported.ModuleName,
icatypes.ModuleName,
Expand Down

0 comments on commit 1fd3bae

Please sign in to comment.