feat(testutil/integration): allow to pass baseapp options (backport #21816) (#21817)

Co-authored-by: Julien Robert <julien@rbrt.fr>
Co-authored-by: marbar3778 <marbar3778@yahoo.com>
This commit is contained in:
mergify[bot] 2024-09-19 14:52:23 +00:00 committed by GitHub
parent ba74aa5cfc
commit a1e7ef0446
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -55,6 +55,7 @@ func NewIntegrationApp(
modules map[string]appmodule.AppModule,
msgRouter *baseapp.MsgServiceRouter,
grpcRouter *baseapp.GRPCQueryRouter,
baseAppOptions ...func(*baseapp.BaseApp),
) *App {
db := coretesting.NewMemDB()
@ -63,7 +64,7 @@ func NewIntegrationApp(
moduleManager.RegisterInterfaces(interfaceRegistry)
txConfig := authtx.NewTxConfig(codec.NewProtoCodec(interfaceRegistry), addressCodec, validatorCodec, authtx.DefaultSignModes)
bApp := baseapp.NewBaseApp(appName, logger, db, txConfig.TxDecoder(), baseapp.SetChainID(appName))
bApp := baseapp.NewBaseApp(appName, logger, db, txConfig.TxDecoder(), append(baseAppOptions, baseapp.SetChainID(appName))...)
bApp.MountKVStores(keys)
bApp.SetInitChainer(func(_ sdk.Context, _ *cmtabcitypes.InitChainRequest) (*cmtabcitypes.InitChainResponse, error) {