@@ -753,7 +753,7 @@ func (t *UDPv5) handlePacket(rawpacket []byte, fromAddr netip.AddrPort) error {
753753 t .unhandled <- up
754754 return nil
755755 }
756- t.log.Debug ("Bad discv5 packet", "id", fromID, "addr", addr, "err", err)
756+ t .log .Trace ("Bad discv5 packet" , "id" , fromID , "addr" , addr , "err" , err )
757757 return err
758758 }
759759 if fromNode != nil {
@@ -774,15 +774,15 @@ func (t *UDPv5) handlePacket(rawpacket []byte, fromAddr netip.AddrPort) error {
774774func (t * UDPv5 ) handleCallResponse (fromID enode.ID , fromAddr netip.AddrPort , p v5wire.Packet ) bool {
775775 ac := t .activeCallByNode [fromID ]
776776 if ac == nil || ! bytes .Equal (p .RequestID (), ac .reqid ) {
777- t.log.Debug(fmt.Sprintf("Unsolicited/late %s response", p.Name()), "id", fromID, "addr", fromAddr)
777+ t .log .Debug (fmt .Sprintf ("[p2p] Unsolicited/late %s response" , p .Name ()), "id" , fromID , "addr" , fromAddr )
778778 return false
779779 }
780780 if fromAddr != ac .addr {
781- t.log.Debug(fmt.Sprintf("%s from wrong endpoint", p.Name()), "id", fromID, "addr", fromAddr)
781+ t .log .Debug (fmt .Sprintf ("[p2p] %s from wrong endpoint" , p .Name ()), "id" , fromID , "addr" , fromAddr )
782782 return false
783783 }
784784 if p .Kind () != ac .responseType {
785- t.log.Debug(fmt.Sprintf("Wrong discv5 response type %s", p.Name()), "id", fromID, "addr", fromAddr)
785+ t .log .Debug (fmt .Sprintf ("[p2p] Wrong discv5 response type %s" , p .Name ()), "id" , fromID , "addr" , fromAddr )
786786 return false
787787 }
788788 t .startResponseTimeout (ac )
@@ -840,7 +840,7 @@ func (t *UDPv5) handleUnknown(p *v5wire.Unknown, fromID enode.ID, fromAddr netip
840840 // them which handshake attempt they need to complete. We tell them to use the
841841 // existing handshake attempt since the response to that one might still be in
842842 // transit.
843- t.log.Debug("Repeating discv5 handshake challenge", "id", fromID, "addr", fromAddr)
843+ t .log .Debug ("[p2p] Repeating discv5 handshake challenge" , "id" , fromID , "addr" , fromAddr )
844844 t .sendResponse (fromID , fromAddr , currentChallenge )
845845 return
846846 }
@@ -864,13 +864,13 @@ var (
864864func (t * UDPv5 ) handleWhoareyou (p * v5wire.Whoareyou , fromID enode.ID , fromAddr netip.AddrPort ) {
865865 c , err := t .matchWithCall (fromID , p .Nonce )
866866 if err != nil {
867- t.log.Debug(" Invalid "+p.Name(), "addr", fromAddr, "err", err)
867+ t .log .Trace ( "[p2p] Invalid "+ p .Name (), "addr" , fromAddr , "err" , err )
868868 return
869869 }
870870
871871 if c .node == nil {
872872 // Can't perform handshake because we don't have the ENR.
873- t.log.Debug("Can't handle "+p.Name(), "addr", fromAddr, "err", "call has no ENR")
873+ t .log .Debug ("[p2p] Can't handle " + p .Name (), "addr" , fromAddr , "err" , "call has no ENR" )
874874 c .err <- errors .New ("remote wants handshake, but call has no ENR" )
875875 return
876876 }
0 commit comments