add some debug output and get things to start working in the sim

This commit is contained in:
Arceliar 2018-10-20 15:21:40 -05:00
parent 03a88fe304
commit 1720dff476
3 changed files with 23 additions and 18 deletions

View file

@ -89,7 +89,7 @@ func (s *searches) addToSearch(sinfo *searchInfo, res *dhtRes) {
// Add responses to toVisit if closer to dest than the res node
from := dhtInfo{key: res.Key, coords: res.Coords}
for _, info := range res.Infos {
if sinfo.visited[*info.getNodeID()] {
if *info.getNodeID() == s.core.dht.nodeID || sinfo.visited[*info.getNodeID()] {
continue
}
if dht_ordered(from.getNodeID(), info.getNodeID(), &res.Dest) {