mirror of
https://github.com/cwinfo/yggdrasil-go.git
synced 2024-11-09 23:20:28 +00:00
don't store every node we hear from in the DHT, only ones we already know about or that are important
This commit is contained in:
parent
169b8747d4
commit
40bfd207f5
@ -260,7 +260,9 @@ func (t *dht) handleRes(res *dhtRes) {
|
||||
key: res.Key,
|
||||
coords: res.Coords,
|
||||
}
|
||||
if _, isIn := t.table[*rinfo.getNodeID()]; isIn || t.isImportant(&rinfo) {
|
||||
t.insert(&rinfo)
|
||||
}
|
||||
for _, info := range res.Infos {
|
||||
if *info.getNodeID() == t.nodeID {
|
||||
continue
|
||||
|
Loading…
Reference in New Issue
Block a user