Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shift To Trace Logs #5561

Merged
merged 10 commits into from
Apr 22, 2020
2 changes: 1 addition & 1 deletion beacon-chain/p2p/handshake.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ func (s *Service) AddConnectionHandler(reqFunc func(ctx context.Context, id peer
ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second)
defer cancel()
if err := reqFunc(ctx, conn.RemotePeer()); err != nil && err != io.EOF {
log.WithError(err).Debug("Handshake failed")
log.WithError(err).Trace("Handshake failed")
if err.Error() == "protocol not supported" {
// This is only to ensure the smooth running of our testnets. This will not be
// used in production.
Expand Down
5 changes: 3 additions & 2 deletions beacon-chain/p2p/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,8 @@ func (s *Service) FindPeersWithSubnet(index uint64) (bool, error) {
}
s.peers.Add(node.Record(), info.ID, multiAddr, network.DirUnknown)
if err := s.connectWithPeer(*info); err != nil {
log.WithError(err).Debugf("Could not connect with peer %s", info.String())
log.WithError(err).Tracef("Could not connect with peer %s", info.String())
continue
}
exists = true
}
Expand Down Expand Up @@ -530,7 +531,7 @@ func (s *Service) connectWithAllPeers(multiAddrs []ma.Multiaddr) {
// make each dial non-blocking
go func(info peer.AddrInfo) {
if err := s.connectWithPeer(info); err != nil {
log.WithError(err).Debugf("Could not connect with peer %s", info.String())
log.WithError(err).Tracef("Could not connect with peer %s", info.String())
}
}(info)
}
Expand Down
2 changes: 1 addition & 1 deletion beacon-chain/p2p/subnets_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ func TestStartDiscV5_DiscoverPeersWithSubnets(t *testing.T) {
}

// Wait for the nodes to have their local routing tables to be populated with the other nodes
time.Sleep(2 * discoveryWaitTime)
time.Sleep(4 * discoveryWaitTime)

// look up 3 different subnets
exists, err := s.FindPeersWithSubnet(1)
Expand Down