5
0
mirror of https://github.com/cwinfo/yggdrasil-go.git synced 2024-11-22 04:50:29 +00:00

disregard nodes if they're unimportant, even if they're already in the DHT

This commit is contained in:
Arceliar 2020-05-25 12:44:06 -05:00
parent 40bfd207f5
commit eefabb5f9f

View File

@ -260,7 +260,7 @@ func (t *dht) handleRes(res *dhtRes) {
key: res.Key,
coords: res.Coords,
}
if _, isIn := t.table[*rinfo.getNodeID()]; isIn || t.isImportant(&rinfo) {
if t.isImportant(&rinfo) {
t.insert(&rinfo)
}
for _, info := range res.Infos {