mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
Tweaked some values in DHT to decrease the discovery time mainly
for the auto tests.
This commit is contained in:
parent
548adda3bb
commit
1069b85ec4
|
@ -39,10 +39,10 @@
|
||||||
#define PING_NUM_MAX 512
|
#define PING_NUM_MAX 512
|
||||||
|
|
||||||
/* Maximum newly announced nodes to ping per TIME_TO_PING seconds. */
|
/* 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*/
|
/* Ping newly announced nodes to ping per TIME_TO_PING seconds*/
|
||||||
#define TIME_TO_PING 8
|
#define TIME_TO_PING 4
|
||||||
|
|
||||||
|
|
||||||
struct PING {
|
struct PING {
|
||||||
|
@ -301,6 +301,9 @@ void do_to_ping(PING *ping)
|
||||||
if (!is_timeout(ping->last_to_ping, TIME_TO_PING))
|
if (!is_timeout(ping->last_to_ping, TIME_TO_PING))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (!ip_isset(&ping->to_ping[0].ip_port.ip))
|
||||||
|
return;
|
||||||
|
|
||||||
ping->last_to_ping = unix_time();
|
ping->last_to_ping = unix_time();
|
||||||
uint32_t i;
|
uint32_t i;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user