From 58411ed8b3cf8e1fc0dad7594f19daa337873580 Mon Sep 17 00:00:00 2001 From: nisdas Date: Thu, 20 Aug 2020 09:43:16 +0800 Subject: [PATCH 1/2] change --- beacon-chain/sync/initial-sync/blocks_fetcher.go | 2 +- beacon-chain/sync/rpc.go | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/beacon-chain/sync/initial-sync/blocks_fetcher.go b/beacon-chain/sync/initial-sync/blocks_fetcher.go index 40332a9b1335..432f6f7874de 100644 --- a/beacon-chain/sync/initial-sync/blocks_fetcher.go +++ b/beacon-chain/sync/initial-sync/blocks_fetcher.go @@ -353,7 +353,7 @@ func (f *blocksFetcher) requestBlocks( } defer func() { if err := streamhelpers.FullClose(stream); err != nil && err.Error() != mux.ErrReset.Error() { - log.WithError(err).Errorf("Failed to close stream with protocol %s", stream.Protocol()) + log.WithError(err).Debugf("Failed to close stream with protocol %s", stream.Protocol()) } }() diff --git a/beacon-chain/sync/rpc.go b/beacon-chain/sync/rpc.go index 0ad98af548e2..a827472bc485 100644 --- a/beacon-chain/sync/rpc.go +++ b/beacon-chain/sync/rpc.go @@ -98,7 +98,7 @@ func (s *Service) registerRPC(baseTopic string, handle rpcHandler) { if err := handle(ctx, base, stream); err != nil { messageFailedProcessingCounter.WithLabelValues(topic).Inc() if err != errWrongForkDigestVersion { - log.WithError(err).Warn("Failed to handle p2p RPC") + log.WithError(err).Debug("Failed to handle p2p RPC") } traceutil.AnnotateError(span, err) } @@ -117,28 +117,28 @@ func (s *Service) registerRPC(baseTopic string, handle rpcHandler) { traceutil.AnnotateError(span, err) return } - log.WithError(err).Warn("Failed to decode stream message") + log.WithError(err).Debug("Failed to decode stream message") traceutil.AnnotateError(span, err) return } if err := handle(ctx, msg.Interface(), stream); err != nil { messageFailedProcessingCounter.WithLabelValues(topic).Inc() if err != errWrongForkDigestVersion { - log.WithError(err).Warn("Failed to handle p2p RPC") + log.WithError(err).Debug("Failed to handle p2p RPC") } traceutil.AnnotateError(span, err) } } else { msg := reflect.New(t) if err := s.p2p.Encoding().DecodeWithMaxLength(stream, msg.Interface()); err != nil { - log.WithError(err).Warn("Failed to decode stream message") + log.WithError(err).Debug("Failed to decode stream message") traceutil.AnnotateError(span, err) return } if err := handle(ctx, msg.Elem().Interface(), stream); err != nil { messageFailedProcessingCounter.WithLabelValues(topic).Inc() if err != errWrongForkDigestVersion { - log.WithError(err).Warn("Failed to handle p2p RPC") + log.WithError(err).Debug("Failed to handle p2p RPC") } traceutil.AnnotateError(span, err) } From 7c78f4cc3fc563c57f43339e476d9aeca8e1ff91 Mon Sep 17 00:00:00 2001 From: nisdas Date: Thu, 20 Aug 2020 09:45:08 +0800 Subject: [PATCH 2/2] change --- beacon-chain/p2p/service.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/beacon-chain/p2p/service.go b/beacon-chain/p2p/service.go index 7969a7a49aa1..79647a49bf29 100644 --- a/beacon-chain/p2p/service.go +++ b/beacon-chain/p2p/service.go @@ -357,7 +357,7 @@ func (s *Service) pingPeers() { for _, pid := range s.peers.Connected() { go func(id peer.ID) { if err := s.pingMethod(s.ctx, id); err != nil { - log.WithField("peer", id).WithError(err).Error("Failed to ping peer") + log.WithField("peer", id).WithError(err).Debug("Failed to ping peer") } }(pid) }