refactor(server/v2/cometbft): add codec.Codec and clean-up APIs (#22566)
This commit is contained in:
@@ -40,7 +40,7 @@ type CommandDependencies[T transaction.Tx] struct {
|
||||
TxConfig client.TxConfig
|
||||
ModuleManager *runtimev2.MM[T]
|
||||
SimApp *simapp.SimApp[T]
|
||||
// could be more generic with serverv2.ServerComponent[T]
|
||||
// could generally be more generic with serverv2.ServerComponent[T]
|
||||
// however, we want to register extra grpc handlers
|
||||
ConsensusServer *cometbft.CometBFTServer[T]
|
||||
ClientContext client.Context
|
||||
@@ -106,11 +106,12 @@ func InitRootCmd[T transaction.Tx](
|
||||
simApp.Name(),
|
||||
simApp.Store(),
|
||||
simApp.App.AppManager,
|
||||
simApp.AppCodec(),
|
||||
&genericTxDecoder[T]{deps.TxConfig},
|
||||
simApp.App.QueryHandlers(),
|
||||
simApp.App.SchemaDecoderResolver(),
|
||||
&genericTxDecoder[T]{deps.TxConfig},
|
||||
deps.GlobalConfig,
|
||||
initCometOptions[T](),
|
||||
deps.GlobalConfig,
|
||||
)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -129,7 +130,7 @@ func InitRootCmd[T transaction.Tx](
|
||||
simApp.Query,
|
||||
deps.GlobalConfig,
|
||||
grpcserver.WithExtraGRPCHandlers[T](
|
||||
deps.ConsensusServer.Consensus.GRPCServiceRegistrar(
|
||||
deps.ConsensusServer.GRPCServiceRegistrar(
|
||||
deps.ClientContext,
|
||||
deps.GlobalConfig,
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user