Skip to content

Commit

Permalink
Shift To Trace Logs (#5561)
Browse files Browse the repository at this point in the history
* shift to trace
* Merge branch 'master' into shiftTrace
* Merge refs/heads/master into shiftTrace
* Merge refs/heads/master into shiftTrace
* Merge refs/heads/master into shiftTrace
* Merge refs/heads/master into shiftTrace
* Merge refs/heads/master into shiftTrace
* Merge refs/heads/master into shiftTrace
* fix test
* Merge branch 'shiftTrace' of https://github.com/prysmaticlabs/geth-sharding into shiftTrace
  • Loading branch information
nisdas committed Apr 22, 2020
1 parent 7b38e97 commit f880fb4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
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

0 comments on commit f880fb4

Please sign in to comment.