diff --git a/app/app.go b/app/app.go index 1a0e56670..7323b53b4 100644 --- a/app/app.go +++ b/app/app.go @@ -229,13 +229,7 @@ func NewIrisApp( interfaceRegistry := encodingConfig.InterfaceRegistry // Setup Mempool - baseAppOptions = append(baseAppOptions, func(app *baseapp.BaseApp) { - memPool := mempool.NoOpMempool{} - app.SetMempool(memPool) - handler := baseapp.NewDefaultProposalHandler(memPool, app) - app.SetPrepareProposal(handler.PrepareProposalHandler()) - app.SetProcessProposal(handler.ProcessProposalHandler()) - }) + baseAppOptions = append(baseAppOptions, NoOpMempoolOption()) bApp := baseapp.NewBaseApp( iristypes.AppName, @@ -957,3 +951,13 @@ func initParamsKeeper( return paramsKeeper } + +func NoOpMempoolOption() func(*baseapp.BaseApp) { + return func(app *baseapp.BaseApp) { + memPool := mempool.NoOpMempool{} + app.SetMempool(memPool) + handler := baseapp.NewDefaultProposalHandler(memPool, app) + app.SetPrepareProposal(handler.PrepareProposalHandler()) + app.SetProcessProposal(handler.ProcessProposalHandler()) + } +}