Skip to content

Commit

Permalink
refactor: remove indexEventsStr from setAnteHandler (cosmos#12426)
Browse files Browse the repository at this point in the history
  • Loading branch information
julienrbrt authored Jul 4, 2022
1 parent 27dc686 commit 233e3ae
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 14 deletions.
16 changes: 8 additions & 8 deletions app.go
Original file line number Diff line number Diff line change
Expand Up @@ -199,25 +199,25 @@ func NewSimApp(

if err := depinject.Inject(appConfig,
&appBuilder,
&app.ParamsKeeper,
&app.CapabilityKeeper,
&app.appCodec,
&app.legacyAmino,
&app.interfaceRegistry,
&app.AccountKeeper,
&app.BankKeeper,
&app.AuthzKeeper,
&app.FeeGrantKeeper,
&app.CapabilityKeeper,
&app.StakingKeeper,
&app.GroupKeeper,
&app.NFTKeeper,
&app.SlashingKeeper,
&app.MintKeeper,
&app.EvidenceKeeper,
&app.DistrKeeper,
&app.UpgradeKeeper,
&app.GovKeeper,
&app.CrisisKeeper,
&app.UpgradeKeeper,
&app.ParamsKeeper,
&app.AuthzKeeper,
&app.EvidenceKeeper,
&app.FeeGrantKeeper,
&app.GroupKeeper,
&app.NFTKeeper,
); err != nil {
panic(err)
}
Expand Down
8 changes: 2 additions & 6 deletions app_legacy.go
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ func NewSimApp(
app.SetInitChainer(app.InitChainer)
app.SetBeginBlocker(app.BeginBlocker)
app.SetEndBlocker(app.EndBlocker)
app.setAnteHandler(encodingConfig.TxConfig, cast.ToStringSlice(appOpts.Get(server.FlagIndexEvents)))
app.setAnteHandler(encodingConfig.TxConfig)
// In v0.46, the SDK introduces _postHandlers_. PostHandlers are like
// antehandlers, but are run _after_ the `runMsgs` execution. They are also
// defined as a chain, and have the same signature as antehandlers.
Expand Down Expand Up @@ -481,11 +481,7 @@ func NewSimApp(
return app
}

func (app *SimApp) setAnteHandler(txConfig client.TxConfig, indexEventsStr []string) {
indexEvents := map[string]struct{}{}
for _, e := range indexEventsStr {
indexEvents[e] = struct{}{}
}
func (app *SimApp) setAnteHandler(txConfig client.TxConfig) {
anteHandler, err := ante.NewAnteHandler(
ante.HandlerOptions{
AccountKeeper: app.AccountKeeper,
Expand Down

0 comments on commit 233e3ae

Please sign in to comment.