mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-10 21:23:58 +01:00
Merge remote-tracking branch 'public/bug3196'
This commit is contained in:
commit
32d6acade8
7
changes/bug3196
Normal file
7
changes/bug3196
Normal file
@ -0,0 +1,7 @@
|
||||
o Minor features:
|
||||
- Raise the threshold of server descriptors needed (75%) and exit
|
||||
server descriptors needed (50%) before we will declare ourselves
|
||||
bootstrapped. This will make clients declare completion a little
|
||||
later, but makes the initially constructed circuits less weird
|
||||
and less in conflict with directory connections. Fixes ticket
|
||||
#3196.
|
@ -5004,7 +5004,14 @@ update_router_have_minimum_dir_info(void)
|
||||
count_usable_descriptors(&num_exit_present, &num_exit_usable,
|
||||
consensus, options, now, options->ExitNodes, 1);
|
||||
|
||||
if (num_present < num_usable/4) {
|
||||
/* What fraction of desired server descriptors do we need before we will
|
||||
* build circuits? */
|
||||
#define FRACTION_USABLE_NEEDED .75
|
||||
/* What fraction of desired _exit_ server descriptors do we need before we
|
||||
* will build circuits? */
|
||||
#define FRACTION_EXIT_USABLE_NEEDED .5
|
||||
|
||||
if (num_present < num_usable * FRACTION_USABLE_NEEDED) {
|
||||
tor_snprintf(dir_info_status, sizeof(dir_info_status),
|
||||
"We have only %d/%d usable %sdescriptors.",
|
||||
num_present, num_usable, using_md ? "micro" : "");
|
||||
@ -5017,7 +5024,7 @@ update_router_have_minimum_dir_info(void)
|
||||
num_present, using_md ? "micro" : "", num_present ? "" : "s");
|
||||
res = 0;
|
||||
goto done;
|
||||
} else if (num_exit_present < num_exit_usable / 3) {
|
||||
} else if (num_exit_present < num_exit_usable * FRACTION_EXIT_USABLE_NEEDED) {
|
||||
tor_snprintf(dir_info_status, sizeof(dir_info_status),
|
||||
"We have only %d/%d usable exit node descriptors.",
|
||||
num_exit_present, num_exit_usable);
|
||||
|
Loading…
Reference in New Issue
Block a user