5
0
mirror of https://github.com/cwinfo/yggdrasil-go.git synced 2024-11-22 03:40:28 +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
commit 45810fa184
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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