mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-10 22:13:47 +00:00
move loglevel to debug (level 4) and remove duplicate log
This commit is contained in:
parent
e4813a1406
commit
bd15e1be1e
1 changed files with 21 additions and 8 deletions
|
|
@ -555,7 +555,9 @@ func (p *PortalProtocol) processOffer(target *enode.Node, resp []byte, request *
|
||||||
p.Log.Trace("<< ACCEPT/"+p.protocolName, "id", target.ID(), "accept", accept)
|
p.Log.Trace("<< ACCEPT/"+p.protocolName, "id", target.ID(), "accept", accept)
|
||||||
isAdded := p.table.addFoundNode(target, true)
|
isAdded := p.table.addFoundNode(target, true)
|
||||||
if isAdded {
|
if isAdded {
|
||||||
log.Info("Node added to bucket", "protocol", p.protocolName, "node", target.IP(), "port", target.UDP())
|
log.Debug("Node added to bucket", "protocol", p.protocolName, "node", target.IP(), "port", target.UDP())
|
||||||
|
} else {
|
||||||
|
log.Debug("Node added to replacements list", "protocol", p.protocolName, "node", target.IP(), "port", target.UDP())
|
||||||
}
|
}
|
||||||
var contentKeyLen int
|
var contentKeyLen int
|
||||||
if request.Kind == TransientOfferRequestKind {
|
if request.Kind == TransientOfferRequestKind {
|
||||||
|
|
@ -677,7 +679,9 @@ func (p *PortalProtocol) processContent(target *enode.Node, resp []byte) (byte,
|
||||||
p.Log.Trace("<< CONTENT/"+p.protocolName, "id", target.ID(), "content", content)
|
p.Log.Trace("<< CONTENT/"+p.protocolName, "id", target.ID(), "content", content)
|
||||||
isAdded := p.table.addFoundNode(target, true)
|
isAdded := p.table.addFoundNode(target, true)
|
||||||
if isAdded {
|
if isAdded {
|
||||||
log.Info("Node added to bucket", "protocol", p.protocolName, "node", target.IP(), "port", target.UDP())
|
log.Debug("Node added to bucket", "protocol", p.protocolName, "node", target.IP(), "port", target.UDP())
|
||||||
|
} else {
|
||||||
|
log.Debug("Node added to replacements list", "protocol", p.protocolName, "node", target.IP(), "port", target.UDP())
|
||||||
}
|
}
|
||||||
return resp[1], content.Content, nil
|
return resp[1], content.Content, nil
|
||||||
case portalwire.ContentConnIdSelector:
|
case portalwire.ContentConnIdSelector:
|
||||||
|
|
@ -690,7 +694,9 @@ func (p *PortalProtocol) processContent(target *enode.Node, resp []byte) (byte,
|
||||||
p.Log.Trace("<< CONTENT_CONNECTION_ID/"+p.protocolName, "id", target.ID(), "resp", common.Bytes2Hex(resp), "connIdMsg", connIdMsg)
|
p.Log.Trace("<< CONTENT_CONNECTION_ID/"+p.protocolName, "id", target.ID(), "resp", common.Bytes2Hex(resp), "connIdMsg", connIdMsg)
|
||||||
isAdded := p.table.addFoundNode(target, true)
|
isAdded := p.table.addFoundNode(target, true)
|
||||||
if isAdded {
|
if isAdded {
|
||||||
log.Info("Node added to bucket", "protocol", p.protocolName, "node", target.IP(), "port", target.UDP())
|
log.Debug("Node added to bucket", "protocol", p.protocolName, "node", target.IP(), "port", target.UDP())
|
||||||
|
} else {
|
||||||
|
log.Debug("Node added to replacements list", "protocol", p.protocolName, "node", target.IP(), "port", target.UDP())
|
||||||
}
|
}
|
||||||
connctx, conncancel := context.WithTimeout(p.closeCtx, defaultUTPConnectTimeout)
|
connctx, conncancel := context.WithTimeout(p.closeCtx, defaultUTPConnectTimeout)
|
||||||
laddr := p.utp.Addr().(*utp.Addr)
|
laddr := p.utp.Addr().(*utp.Addr)
|
||||||
|
|
@ -735,7 +741,9 @@ func (p *PortalProtocol) processContent(target *enode.Node, resp []byte) (byte,
|
||||||
p.Log.Trace("<< CONTENT_ENRS/"+p.protocolName, "id", target.ID(), "enrs", enrs)
|
p.Log.Trace("<< CONTENT_ENRS/"+p.protocolName, "id", target.ID(), "enrs", enrs)
|
||||||
isAdded := p.table.addFoundNode(target, true)
|
isAdded := p.table.addFoundNode(target, true)
|
||||||
if isAdded {
|
if isAdded {
|
||||||
log.Info("Node added to bucket", "protocol", p.protocolName, "node", target.IP(), "port", target.UDP())
|
log.Debug("Node added to bucket", "protocol", p.protocolName, "node", target.IP(), "port", target.UDP())
|
||||||
|
} else {
|
||||||
|
log.Debug("Node added to replacements list", "protocol", p.protocolName, "node", target.IP(), "port", target.UDP())
|
||||||
}
|
}
|
||||||
nodes := p.filterNodes(target, enrs.Enrs, nil)
|
nodes := p.filterNodes(target, enrs.Enrs, nil)
|
||||||
return resp[1], nodes, nil
|
return resp[1], nodes, nil
|
||||||
|
|
@ -761,9 +769,10 @@ func (p *PortalProtocol) processNodes(target *enode.Node, resp []byte, distances
|
||||||
|
|
||||||
isAdded := p.table.addFoundNode(target, true)
|
isAdded := p.table.addFoundNode(target, true)
|
||||||
if isAdded {
|
if isAdded {
|
||||||
log.Info("Node added to bucket", "protocol", p.protocolName, "node", target.IP(), "port", target.UDP())
|
log.Debug("Node added to bucket", "protocol", p.protocolName, "node", target.IP(), "port", target.UDP())
|
||||||
|
} else {
|
||||||
|
log.Debug("Node added to replacements list", "protocol", p.protocolName, "node", target.IP(), "port", target.UDP())
|
||||||
}
|
}
|
||||||
log.Info("Node added to bucket", "protocol", p.protocolName, "node", target.IP(), "port", target.UDP())
|
|
||||||
nodes := p.filterNodes(target, nodesResp.Enrs, distances)
|
nodes := p.filterNodes(target, nodesResp.Enrs, distances)
|
||||||
|
|
||||||
return nodes, nil
|
return nodes, nil
|
||||||
|
|
@ -822,7 +831,9 @@ func (p *PortalProtocol) processPong(target *enode.Node, resp []byte) (*portalwi
|
||||||
p.Log.Trace("<< PONG_RESPONSE/"+p.protocolName, "id", target.ID(), "pong", pong, "customPayload", customPayload)
|
p.Log.Trace("<< PONG_RESPONSE/"+p.protocolName, "id", target.ID(), "pong", pong, "customPayload", customPayload)
|
||||||
isAdded := p.table.addFoundNode(target, true)
|
isAdded := p.table.addFoundNode(target, true)
|
||||||
if isAdded {
|
if isAdded {
|
||||||
log.Info("Node added to bucket", "protocol", p.protocolName, "node", target.IP(), "port", target.UDP())
|
log.Debug("Node added to bucket", "protocol", p.protocolName, "node", target.IP(), "port", target.UDP())
|
||||||
|
} else {
|
||||||
|
log.Debug("Node added to replacements list", "protocol", p.protocolName, "node", target.IP(), "port", target.UDP())
|
||||||
}
|
}
|
||||||
|
|
||||||
p.radiusCache.Set([]byte(target.ID().String()), customPayload.Radius)
|
p.radiusCache.Set([]byte(target.ID().String()), customPayload.Radius)
|
||||||
|
|
@ -1370,7 +1381,9 @@ func (p *PortalProtocol) lookupWorker(destNode *enode.Node, target enode.ID) ([]
|
||||||
if n.ID() != p.Self().ID() {
|
if n.ID() != p.Self().ID() {
|
||||||
isAdded := p.table.addFoundNode(n, false)
|
isAdded := p.table.addFoundNode(n, false)
|
||||||
if isAdded {
|
if isAdded {
|
||||||
log.Info("Node added to bucket", "protocol", p.protocolName, "node", n.IP(), "port", n.UDP())
|
log.Debug("Node added to bucket", "protocol", p.protocolName, "node", n.IP(), "port", n.UDP())
|
||||||
|
} else {
|
||||||
|
log.Debug("Node added to replacements list", "protocol", p.protocolName, "node", n.IP(), "port", n.UDP())
|
||||||
}
|
}
|
||||||
nodes.push(n, portalFindnodesResultLimit)
|
nodes.push(n, portalFindnodesResultLimit)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue