Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
julienrbrt committed Dec 11, 2024
1 parent 52fe67f commit b0260cc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
7 changes: 4 additions & 3 deletions server/v2/cometbft/grpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -463,8 +463,9 @@ func parseOrderBy(orderBy txtypes.OrderBy) string {

func (c *consensus[T]) maybeHandleExternalServices(ctx context.Context, req *abci.QueryRequest) (transaction.Msg, error) {
// Handle comet service
if strings.Contains(req.Path, "/cosmos.base.tendermint.v1beta1.Service") {
if strings.HasPrefix(req.Path, "/cosmos.base.tendermint.v1beta1.Service") {
rpcClient, _ := rpchttp.New(c.cfg.AppTomlConfig.Address)

cometQServer := cmtservice.NewQueryServer(rpcClient, c.Query, c.consensusAddressCodec)
paths := strings.Split(req.Path, "/")
if len(paths) <= 2 {
Expand Down Expand Up @@ -494,7 +495,7 @@ func (c *consensus[T]) maybeHandleExternalServices(ctx context.Context, req *abc
}

// Handle node service
if strings.Contains(req.Path, "/cosmos.base.node.v1beta1.Service") {
if strings.HasPrefix(req.Path, "/cosmos.base.node.v1beta1.Service") {
nodeQService := nodeServer[T]{c.cfgMap, c.cfg.AppTomlConfig, c}
paths := strings.Split(req.Path, "/")
if len(paths) <= 2 {
Expand All @@ -514,7 +515,7 @@ func (c *consensus[T]) maybeHandleExternalServices(ctx context.Context, req *abc
}

// Handle tx service
if strings.Contains(req.Path, "/cosmos.tx.v1beta1.Service") {
if strings.HasPrefix(req.Path, "/cosmos.tx.v1beta1.Service") {
// init simple client context
amino := codec.NewLegacyAmino()
std.RegisterLegacyAminoCodec(amino)
Expand Down
1 change: 1 addition & 0 deletions server/v2/cometbft/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ func New[T transaction.Tx](
addrPeerFilter: srv.serverOptions.AddrPeerFilter,
idPeerFilter: srv.serverOptions.IdPeerFilter,
cfgMap: cfg,
consensusAddressCodec: consensusAddressCodec,
}

c.optimisticExec = oe.NewOptimisticExecution(
Expand Down

0 comments on commit b0260cc

Please sign in to comment.