mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2025-02-24 14:51:11 +01:00
Merge remote-tracking branch 'public/bug18815'
This commit is contained in:
commit
e3a4511049
2 changed files with 7 additions and 3 deletions
3
changes/bug18815
Normal file
3
changes/bug18815
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
o Minor features (performance):
|
||||||
|
- When fetching a consensus for the first time, use optimistic data.
|
||||||
|
This saves a round-trip during startup. Closes ticket 18815.
|
|
@ -2141,10 +2141,11 @@ optimistic_data_enabled(void)
|
||||||
{
|
{
|
||||||
const or_options_t *options = get_options();
|
const or_options_t *options = get_options();
|
||||||
if (options->OptimisticData < 0) {
|
if (options->OptimisticData < 0) {
|
||||||
/* XXX023 consider having auto default to 1 rather than 0 before
|
/* Note: this default was 0 before #18815 was merged. We can't take the
|
||||||
* the 0.2.3 branch goes stable. See bug 3617. -RD */
|
* parameter out of the consensus until versions before that are all
|
||||||
|
* obsolete. */
|
||||||
const int32_t enabled =
|
const int32_t enabled =
|
||||||
networkstatus_get_param(NULL, "UseOptimisticData", 0, 0, 1);
|
networkstatus_get_param(NULL, "UseOptimisticData", /*default*/ 1, 0, 1);
|
||||||
return (int)enabled;
|
return (int)enabled;
|
||||||
}
|
}
|
||||||
return options->OptimisticData;
|
return options->OptimisticData;
|
||||||
|
|
Loading…
Add table
Reference in a new issue