diff --git a/core/router/service.go b/core/router/service.go index 669d43db2c1d..43cc7e8fb9b8 100644 --- a/core/router/service.go +++ b/core/router/service.go @@ -7,6 +7,7 @@ import ( ) // Service is the interface that wraps the basic methods for a router service. +// This service allows to invoke messages and queries via a message router. type Service interface { InvokeTyped(ctx context.Context, req, res protoiface.MessageV1) error InvokeUntyped(ctx context.Context, req protoiface.MessageV1) (res protoiface.MessageV1, err error) diff --git a/runtime/router.go b/runtime/router.go index b2237be3d592..9b629d18a5e3 100644 --- a/runtime/router.go +++ b/runtime/router.go @@ -7,7 +7,6 @@ import ( "github.com/cosmos/gogoproto/proto" protov2 "google.golang.org/protobuf/proto" - "google.golang.org/protobuf/reflect/protoregistry" "google.golang.org/protobuf/runtime/protoiface" "cosmossdk.io/core/router" @@ -16,18 +15,17 @@ import ( "github.com/cosmos/cosmos-sdk/baseapp" ) +// NewMsgRouterService creates a router.Service which allows to invoke messages and queries using the msg router. func NewMsgRouterService(storeService store.KVStoreService, router baseapp.MessageRouter) router.Service { return &msgRouterService{ storeService: storeService, router: router, - resolver: protoregistry.GlobalTypes, } } type msgRouterService struct { storeService store.KVStoreService router baseapp.MessageRouter - resolver protoregistry.MessageTypeResolver } // InvokeTyped execute a message and fill-in a response.