mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-28 07:36:44 +00:00
fix:make add enr
Signed-off-by: Chen Kai <281165273grape@gmail.com>
This commit is contained in:
parent
a7cb535e53
commit
1189e67f12
2 changed files with 2 additions and 2 deletions
|
|
@ -105,7 +105,7 @@ func (d *DiscV5API) AddEnr(enr string) (bool, error) {
|
|||
// immediately add the node to the routing table
|
||||
d.DiscV5.tab.mutex.Lock()
|
||||
defer d.DiscV5.tab.mutex.Unlock()
|
||||
d.DiscV5.tab.handleAddNode(addNodeOp{node: n, isInbound: false, forceSetLive: true})
|
||||
d.DiscV5.tab.handleAddNode(addNodeOp{node: n, isInbound: true, forceSetLive: true})
|
||||
return true, nil
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -290,7 +290,7 @@ func (p *PortalProtocol) AddEnr(n *enode.Node) {
|
|||
// immediately add the node to the routing table
|
||||
p.table.mutex.Lock()
|
||||
defer p.table.mutex.Unlock()
|
||||
p.table.handleAddNode(addNodeOp{node: n, isInbound: false, forceSetLive: true})
|
||||
p.table.handleAddNode(addNodeOp{node: n, isInbound: true, forceSetLive: true})
|
||||
id := n.ID().String()
|
||||
p.radiusCache.Set([]byte(id), MaxDistance)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue