mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2024-11-27 12:05:23 +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,
|
||||
}
|
||||
t.insert(&rinfo)
|
||||
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