p2p error logging (#3292)

This commit is contained in:
Preston Van Loon 2019-08-23 17:46:54 -04:00 committed by terence tsao
parent 0c0ec97343
commit 0353cc533e

View File

@ -57,6 +57,7 @@ func (s *Service) Start() {
privKey, err := privKey(s.cfg) privKey, err := privKey(s.cfg)
if err != nil { if err != nil {
s.startupErr = err s.startupErr = err
log.WithError(err).Error("Failed to generate p2p private key")
return return
} }
@ -65,6 +66,7 @@ func (s *Service) Start() {
h, err := libp2p.New(s.ctx, opts...) h, err := libp2p.New(s.ctx, opts...)
if err != nil { if err != nil {
s.startupErr = err s.startupErr = err
log.WithError(err).Error("Failed to create p2p host")
return return
} }
s.host = h s.host = h