Skip to content

Commit

Permalink
Tweaked some values in DHT to decrease the discovery time mainly
Browse files Browse the repository at this point in the history
for the auto tests.
  • Loading branch information
irungentoo committed Aug 31, 2014
1 parent 548adda commit 1069b85
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions toxcore/ping.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@
#define PING_NUM_MAX 512

/* Maximum newly announced nodes to ping per TIME_TO_PING seconds. */
#define MAX_TO_PING 8
#define MAX_TO_PING 16

/* Ping newly announced nodes to ping per TIME_TO_PING seconds*/
#define TIME_TO_PING 8
#define TIME_TO_PING 4


struct PING {
Expand Down Expand Up @@ -301,6 +301,9 @@ void do_to_ping(PING *ping)
if (!is_timeout(ping->last_to_ping, TIME_TO_PING))
return;

if (!ip_isset(&ping->to_ping[0].ip_port.ip))
return;

ping->last_to_ping = unix_time();
uint32_t i;

Expand Down

0 comments on commit 1069b85

Please sign in to comment.