mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-15 08:23:46 +00:00
add logs
This commit is contained in:
parent
458839f483
commit
26114068ee
2 changed files with 2 additions and 1 deletions
|
|
@ -251,6 +251,7 @@ func (p *PortalProtocolAPI) RoutingTableInfo() *RoutingTableInfo {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *PortalProtocolAPI) AddEnr(enr string) (bool, error) {
|
func (p *PortalProtocolAPI) AddEnr(enr string) (bool, error) {
|
||||||
|
p.portalProtocol.Log.Debug("serving AddEnr", "enr", enr)
|
||||||
n, err := enode.Parse(enode.ValidSchemes, enr)
|
n, err := enode.Parse(enode.ValidSchemes, enr)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return false, err
|
return false, err
|
||||||
|
|
|
||||||
|
|
@ -292,7 +292,7 @@ func (p *PortalProtocol) AddEnr(n *enode.Node) {
|
||||||
defer p.table.mutex.Unlock()
|
defer p.table.mutex.Unlock()
|
||||||
added := p.table.handleAddNode(addNodeOp{node: n, isInbound: true, forceSetLive: true})
|
added := p.table.handleAddNode(addNodeOp{node: n, isInbound: true, forceSetLive: true})
|
||||||
if !added {
|
if !added {
|
||||||
p.Log.Warn("add node failed", "id", n.ID())
|
p.Log.Warn("add node failed", "id", n.ID(), n.IPAddr())
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
id := n.ID().String()
|
id := n.ID().String()
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue