mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-11 06:23:47 +00:00
chg: register reflection for grpc server
This commit is contained in:
parent
aae292c8ca
commit
5d0d4fbbc5
1 changed files with 2 additions and 0 deletions
|
|
@ -3,6 +3,7 @@ package server
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"google.golang.org/grpc/reflection"
|
||||||
"io"
|
"io"
|
||||||
"math/big"
|
"math/big"
|
||||||
"net"
|
"net"
|
||||||
|
|
@ -443,6 +444,7 @@ func (s *Server) gRPCServerByListener(listener net.Listener) error {
|
||||||
s.grpcServer = grpc.NewServer(s.withLoggingUnaryInterceptor())
|
s.grpcServer = grpc.NewServer(s.withLoggingUnaryInterceptor())
|
||||||
proto.RegisterBorServer(s.grpcServer, s)
|
proto.RegisterBorServer(s.grpcServer, s)
|
||||||
protobor.RegisterBorApiServer(s.grpcServer, s)
|
protobor.RegisterBorApiServer(s.grpcServer, s)
|
||||||
|
reflection.Register(s.grpcServer)
|
||||||
|
|
||||||
go func() {
|
go func() {
|
||||||
if err := s.grpcServer.Serve(listener); err != nil {
|
if err := s.grpcServer.Serve(listener); err != nil {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue