Skip to content

Commit 437050d

Browse files
authored
feat: enable GRPC server reflection (#2173)
Closes #2172 ## Testing ``` $ grpcurl -plaintext 127.0.0.1:9098 list grpc.reflection.v1.ServerReflection grpc.reflection.v1alpha.ServerReflection tendermint.rpc.grpc.BlobstreamAPI tendermint.rpc.grpc.BlockAPI tendermint.rpc.grpc.BroadcastAPI ```
1 parent fcfad02 commit 437050d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

rpc/grpc/client_server.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import (
66

77
"google.golang.org/grpc"
88
"google.golang.org/grpc/credentials/insecure"
9+
"google.golang.org/grpc/reflection"
910

1011
cmtnet "github.com/cometbft/cometbft/libs/net"
1112
"github.com/cometbft/cometbft/rpc/core"
@@ -27,14 +28,14 @@ func StartGRPCServer(env *core.Environment, ln net.Listener) error {
2728
grpcServer := grpc.NewServer()
2829
RegisterBroadcastAPIServer(grpcServer, &broadcastAPI{env: env})
2930

30-
// block api
3131
api := NewBlockAPI(env)
3232
RegisterBlockAPIServer(grpcServer, api)
3333

34-
// blobstream api
3534
blobstreamAPI := NewBlobstreamAPI(env)
3635
RegisterBlobstreamAPIServer(grpcServer, blobstreamAPI)
3736

37+
reflection.Register(grpcServer)
38+
3839
errCh := make(chan error, 2)
3940
ctx, cancel := context.WithCancel(context.Background())
4041
defer cancel()

0 commit comments

Comments
 (0)