mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
Small onion search improvement.
This commit is contained in:
parent
07a6f482d9
commit
7e56ae40fd
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user