mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-31 00:53:46 +00:00
fix: not cache nil node
This commit is contained in:
parent
12182b4afe
commit
81477ca08b
1 changed files with 3 additions and 1 deletions
|
|
@ -401,7 +401,9 @@ func (p *PortalProtocol) cacheNodeById(id enode.ID, addr *net.UDPAddr) {
|
|||
go func() {
|
||||
if _, ok := p.cachedIds[addr.String()]; !ok {
|
||||
n := p.ResolveNodeId(id)
|
||||
p.cacheNode(n)
|
||||
if n != nil {
|
||||
p.cacheNode(n)
|
||||
}
|
||||
}
|
||||
}()
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue