4
0
mirror of https://github.com/cwinfo/yggdrasil-go.git synced 2025-06-17 19:56:06 +00:00

Merge pull request #703 from Arceliar/dht

Store less in the DHT
This commit is contained in:
Neil Alexander
2020-05-25 22:18:00 +01:00
committed by GitHub

View File

@ -260,7 +260,9 @@ func (t *dht) handleRes(res *dhtRes) {
key: res.Key,
coords: res.Coords,
}
t.insert(&rinfo)
if t.isImportant(&rinfo) {
t.insert(&rinfo)
}
for _, info := range res.Infos {
if *info.getNodeID() == t.nodeID {
continue