From b98144202251bde5054b19af2daf80cc535634fd Mon Sep 17 00:00:00 2001 From: terence tsao Date: Fri, 14 Aug 2020 08:18:04 -0700 Subject: [PATCH] Register health APIs handler (#6999) * DB: add block roots test * Merge branch 'master' of github.com:prysmaticlabs/prysm * Merge branch 'master' of github.com:prysmaticlabs/prysm * Pool: add seen atts map * Pool: use seen atts map * Pool: clear seen map * Merge branch 'master' of github.com:prysmaticlabs/prysm * Merge branch 'master' of github.com:prysmaticlabs/prysm * RPC: register health endpoint * Gazelle --- validator/rpc/gateway/gateway.go | 3 +++ validator/rpc/server.go | 1 + 2 files changed, 4 insertions(+) diff --git a/validator/rpc/gateway/gateway.go b/validator/rpc/gateway/gateway.go index fc13178894c1..5a2e529bacf1 100644 --- a/validator/rpc/gateway/gateway.go +++ b/validator/rpc/gateway/gateway.go @@ -59,6 +59,9 @@ func (g *Gateway) Start() { if err := pb.RegisterAuthHandlerFromEndpoint(ctx, gwmux, g.remoteAddr, opts); err != nil { log.Fatalf("Could not register API handler with grpc endpoint: %v", err) } + if err := pb.RegisterHealthHandlerFromEndpoint(ctx, gwmux, g.remoteAddr, opts); err != nil { + log.Fatalf("Could not register API handler with grpc endpoint: %v", err) + } g.mux.Handle("/", g.corsMiddleware(gwmux)) g.server = &http.Server{ Addr: g.gatewayAddr, diff --git a/validator/rpc/server.go b/validator/rpc/server.go index e880223994b5..55fa4d912749 100644 --- a/validator/rpc/server.go +++ b/validator/rpc/server.go @@ -122,6 +122,7 @@ func (s *Server) Start() { // Register services available for the gRPC server. reflection.Register(s.grpcServer) pb.RegisterAuthServer(s.grpcServer, s) + pb.RegisterHealthServer(s.grpcServer, s) go func() { if s.listener != nil {