mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-10 07:58:22 -05:00
Fatal If No TLS Found in RPC Service (#7614)
* fatal if no tls found rpc * tests Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
This commit is contained in:
@@ -208,8 +208,7 @@ func (s *Service) Start() {
|
||||
if s.withCert != "" && s.withKey != "" {
|
||||
creds, err := credentials.NewServerTLSFromFile(s.withCert, s.withKey)
|
||||
if err != nil {
|
||||
log.Errorf("Could not load TLS keys: %s", err)
|
||||
s.credentialError = err
|
||||
log.WithError(err).Fatal("Could not load TLS keys")
|
||||
}
|
||||
opts = append(opts, grpc.Creds(creds))
|
||||
} else {
|
||||
|
||||
@@ -28,8 +28,6 @@ func TestLifecycle_OK(t *testing.T) {
|
||||
}
|
||||
rpcService := NewService(context.Background(), &Config{
|
||||
Port: "7348",
|
||||
CertFlag: "alice.crt",
|
||||
KeyFlag: "alice.key",
|
||||
SyncService: &mockSync.Sync{IsSyncing: false},
|
||||
BlockReceiver: chainService,
|
||||
AttestationReceiver: chainService,
|
||||
|
||||
@@ -123,8 +123,7 @@ func (s *Server) Start() {
|
||||
if s.withCert != "" && s.withKey != "" {
|
||||
creds, err := credentials.NewServerTLSFromFile(s.withCert, s.withKey)
|
||||
if err != nil {
|
||||
log.Errorf("Could not load TLS keys: %s", err)
|
||||
s.credentialError = err
|
||||
log.WithError(err).Fatal("Could not load TLS keys")
|
||||
}
|
||||
opts = append(opts, grpc.Creds(creds))
|
||||
log.WithFields(logrus.Fields{
|
||||
|
||||
Reference in New Issue
Block a user