refactor: remove `indexEventsStr` from `setAnteHandler` (#12426)

This commit is contained in:
Julien Robert 2022-07-04 18:08:54 +02:00 committed by GitHub
parent 4675cb54f3
commit ff3947a344
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 14 deletions

View File

@ -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)
}

View File

@ -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.
@ -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,