mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-25 12:57:18 +00:00
Rpc service: log error if slasher is not up (#6907)
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
This commit is contained in:
parent
1d679c9533
commit
dc0f2140b3
@ -39,6 +39,7 @@ go_library(
|
||||
"@com_github_sirupsen_logrus//:go_default_library",
|
||||
"@io_opencensus_go//plugin/ocgrpc:go_default_library",
|
||||
"@org_golang_google_grpc//:go_default_library",
|
||||
"@org_golang_google_grpc//connectivity:go_default_library",
|
||||
"@org_golang_google_grpc//credentials:go_default_library",
|
||||
"@org_golang_google_grpc//peer:go_default_library",
|
||||
"@org_golang_google_grpc//reflection:go_default_library",
|
||||
|
@ -40,6 +40,7 @@ import (
|
||||
"github.com/sirupsen/logrus"
|
||||
"go.opencensus.io/plugin/ocgrpc"
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/grpc/connectivity"
|
||||
"google.golang.org/grpc/credentials"
|
||||
"google.golang.org/grpc/peer"
|
||||
"google.golang.org/grpc/reflection"
|
||||
@ -341,6 +342,11 @@ func (s *Service) startSlasherClient() {
|
||||
log.Errorf("Could not dial endpoint: %s, %v", s.slasherProvider, err)
|
||||
return
|
||||
}
|
||||
if conn.GetState() != connectivity.Ready {
|
||||
log.Errorf("Slasher status is %s, please verify slasher is up", conn.GetState())
|
||||
return
|
||||
}
|
||||
|
||||
log.Info("Successfully started hash slinging slasher©️ gRPC connection")
|
||||
s.slasherConn = conn
|
||||
s.slasherClient = slashpb.NewSlasherClient(s.slasherConn)
|
||||
|
Loading…
Reference in New Issue
Block a user