mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2025-04-29 06:35:07 +03:00
allow searches to continue as long as the next hop is closer than the Nth closest node found so far where N is currently 16 instead of 1 (makes searches more reliable), and cache all intermediate search steps in the dht
This commit is contained in:
parent
ea7e074cf0
commit
b651e57203
2 changed files with 54 additions and 19 deletions
|
@ -260,9 +260,7 @@ func (t *dht) handleRes(res *dhtRes) {
|
|||
key: res.Key,
|
||||
coords: res.Coords,
|
||||
}
|
||||
if t.isImportant(&rinfo) {
|
||||
t.insert(&rinfo)
|
||||
}
|
||||
t.insert(&rinfo)
|
||||
for _, info := range res.Infos {
|
||||
if *info.getNodeID() == t.nodeID {
|
||||
continue
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue