]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Change UseOptimisticData default to 1.
authorNick Mathewson <nickm@torproject.org>
Mon, 18 Apr 2016 17:55:23 +0000 (13:55 -0400)
committerNick Mathewson <nickm@torproject.org>
Mon, 18 Apr 2016 17:55:23 +0000 (13:55 -0400)
This lets us use optimistic data for downloading our initial
consensus.

Closes ticket 18815.

changes/bug18815 [new file with mode: 0644]
src/or/circuituse.c

diff --git a/changes/bug18815 b/changes/bug18815
new file mode 100644 (file)
index 0000000..cb504b2
--- /dev/null
@@ -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.
index 31003ea095884039adc73142390743b3fd34bf3b..e4eef2cf6ced76cbf6819c7102d4ca57645869ee 100644 (file)
@@ -2141,10 +2141,11 @@ optimistic_data_enabled(void)
 {
   const or_options_t *options = get_options();
   if (options->OptimisticData < 0) {
-    /* XXX023 consider having auto default to 1 rather than 0 before
-     * the 0.2.3 branch goes stable. See bug 3617. -RD */
+    /* Note: this default was 0 before #18815 was merged. We can't take the
+     * parameter out of the consensus until versions before that are all
+     * obsolete. */
     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 options->OptimisticData;