Skip to content

Commit

Permalink
Revert "Make router learn about better routes faster."
Browse files Browse the repository at this point in the history
oops too soon

This reverts commit 539cdfc.
  • Loading branch information
cjdelisle committed Jan 26, 2012
1 parent 539cdfc commit 5ae67bc
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions dht/dhtcore/RouterModule.c
Expand Up @@ -425,11 +425,7 @@ static void searchStep(struct SearchCallbackContext* scc)
// Get the node from the nodestore because there might be a much better path to the same node.
struct Node* n = NodeStore_getBest(nextSearchNode->address, scc->routerModule->nodeStore);
if (n && !memcmp(n->address.ip6.bytes, nextSearchNode->address->ip6.bytes, 16)) {
uint64_t n = Endian_bigEndianToHost64(n->address.networkAddress_be);
uint64_t nsn = Endian_bigEndianToHost64(nextSearchNode->address->networkAddress_be);
if (n < nsn) {
nextSearchNode->address = &n->address;
}
nextSearchNode->address = &n->address;
}

sendRequest(nextSearchNode->address,
Expand Down

0 comments on commit 5ae67bc

Please sign in to comment.