feat(runtime): message router service (#19571)

This commit is contained in:
Julien Robert
2024-03-04 10:25:43 +00:00
committed by GitHub
parent 83a7f0ee37
commit cfd426fdb3
22 changed files with 419 additions and 55 deletions
+4 -4
View File
@@ -75,13 +75,13 @@ func NewIntegrationApp(
return moduleManager.EndBlock(sdkCtx)
})
router := baseapp.NewMsgServiceRouter()
router.SetInterfaceRegistry(interfaceRegistry)
bApp.SetMsgServiceRouter(router)
msgRouter := baseapp.NewMsgServiceRouter()
msgRouter.SetInterfaceRegistry(interfaceRegistry)
bApp.SetMsgServiceRouter(msgRouter)
if keys[consensusparamtypes.StoreKey] != nil {
// set baseApp param store
consensusParamsKeeper := consensusparamkeeper.NewKeeper(appCodec, runtime.NewEnvironment(runtime.NewKVStoreService(keys[consensusparamtypes.StoreKey]), log.NewNopLogger()), authtypes.NewModuleAddress("gov").String())
consensusParamsKeeper := consensusparamkeeper.NewKeeper(appCodec, runtime.NewEnvironment(runtime.NewKVStoreService(keys[consensusparamtypes.StoreKey]), log.NewNopLogger(), runtime.EnvWithRouterService(baseapp.NewGRPCQueryRouter(), msgRouter)), authtypes.NewModuleAddress("gov").String())
bApp.SetParamStore(consensusParamsKeeper.ParamsStore)
if err := bApp.LoadLatestVersion(); err != nil {