Small onion search improvement.

This commit is contained in:
irungentoo 2015-12-12 14:50:25 -05:00
parent 07a6f482d9
commit 7e56ae40fd
No known key found for this signature in database
GPG Key ID: 10349DC9BED89E98

View File

@ -597,7 +597,9 @@ static int client_ping_nodes(Onion_Client *onion_c, uint32_t num, const Node_for
continue;
if (is_timeout(list_nodes[0].timestamp, ONION_NODE_TIMEOUT)
|| id_closest(reference_id, list_nodes[0].public_key, nodes[i].public_key) == 2) {
|| id_closest(reference_id, list_nodes[0].public_key, nodes[i].public_key) == 2
|| is_timeout(list_nodes[1].timestamp, ONION_NODE_TIMEOUT)
|| id_closest(reference_id, list_nodes[1].public_key, nodes[i].public_key) == 2 ) {
/* check if node is already in list. */
for (j = 0; j < list_length; ++j) {
if (memcmp(list_nodes[j].public_key, nodes[i].public_key, crypto_box_PUBLICKEYBYTES) == 0) {