mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-06 19:41:15 +01:00
r16573@catbus: nickm | 2007-11-08 11:57:16 -0500
Mess with the formula for the Guard flag again. Now it requires that you be in the most familiar 7/8 of nodes, and have above median wfu for that 7/8th. See spec for details. Also, log thresholds better. svn:r12440
This commit is contained in:
@@ -322,6 +322,7 @@ int find_nth_int(int *array, int n_elements, int nth);
|
||||
time_t find_nth_time(time_t *array, int n_elements, int nth);
|
||||
double find_nth_double(double *array, int n_elements, int nth);
|
||||
uint32_t find_nth_uint32(uint32_t *array, int n_elements, int nth);
|
||||
long find_nth_long(long *array, int n_elements, int nth);
|
||||
static INLINE int
|
||||
median_int(int *array, int n_elements)
|
||||
{
|
||||
@@ -342,6 +343,11 @@ median_uint32(uint32_t *array, int n_elements)
|
||||
{
|
||||
return find_nth_uint32(array, n_elements, (n_elements-1)/2);
|
||||
}
|
||||
static INLINE long
|
||||
median_long(long *array, int n_elements)
|
||||
{
|
||||
return find_nth_long(array, n_elements, (n_elements-1)/2);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user