cjdelisle/cjdns — pull request #674 by Arceliar (2014-10-02 18:09:22+00:00)
Title: Searchless DHT

Does the following:

1. Reworked the DHT maintenance stuff in Janitor.c to use RouterModule_findNode() instead of searches. For now, left the janitor's search code in place. Can clean up if there aren't any problems with this.
2. Refactored that ugly bit-twiddling over kad buckets, so it only appears in one place. (Currently in NodeStore, technically it doesn't need anything from there and could live in Address instead, I think...)
3. Require that Rumor-Mills have an entry that matches both ip6 and path before we skip adding an address. The mill for the DHT doesn't work as well if it's an || instead of an && in the check.
4. Re-enable Janitor.c:splitLinks, because nodes introduced by the dhtMill are very slow to split links otherwise (and since they aren't introduced by a getPeers, they usually start with a long link).