]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
r14526@catbus: nickm | 2007-08-13 14:08:37 -0400
authorNick Mathewson <nickm@torproject.org>
Mon, 13 Aug 2007 18:09:38 +0000 (18:09 +0000)
committerNick Mathewson <nickm@torproject.org>
Mon, 13 Aug 2007 18:09:38 +0000 (18:09 +0000)
 Make voting interval configurable.

svn:r11083

src/or/config.c
src/or/dirvote.c
src/or/or.h

index e1260e96a2b2b426885897786d81e1813f66f00d..1e069e83e554f9600e55f8f769d5b07157021091 100644 (file)
@@ -271,6 +271,8 @@ static config_var_t _option_vars[] = {
   VAR("V1AuthoritativeDirectory",BOOL, V1AuthoritativeDir,   "0"),
   VAR("V2AuthoritativeDirectory",BOOL, V2AuthoritativeDir,   "0"),
   VAR("V3AuthoritativeDirectory",BOOL, V3AuthoritativeDir,   "0"),
+  /* XXXX020 check this for sanity. */
+  VAR("V3AuthVotingInterval",INTERVAL, V3AuthVotingInterval, "1 hour"),
   VAR("VersioningAuthoritativeDirectory",BOOL,VersioningAuthoritativeDir, "0"),
   VAR("VirtualAddrNetwork",  STRING,   VirtualAddrNetwork,   "127.192.0.0/10"),
   VAR("__AllDirActionsPrivate",BOOL,   AllDirActionsPrivate, "0"),
index 8034b7d48dfa3e9bf87478f821c95409109c1842..ad15c0422605fa3d3b95825c0d436a934c83ef2b 100644 (file)
@@ -998,10 +998,12 @@ authority_cert_dup(authority_cert_t *cert)
 void
 dirvote_get_preferred_voting_intervals(vote_timing_t *timing_out)
 {
+  or_options_t *options = get_options();
+
   tor_assert(timing_out);
 
-  /* XXXX020 make these configurable. */
-  timing_out->vote_interval = 3600;
+  timing_out->vote_interval = options->V3AuthVotingInterval;
+ /* XXXX020 make these configurable. */
   timing_out->n_intervals_valid = 3;
   timing_out->vote_delay = 300;
   timing_out->dist_delay = 300;
index e9f202a009ce7ef28e41431ff87107cc6810fb07..142f5352c085c69f9c0783312294f2fc508d281e 100644 (file)
@@ -2060,13 +2060,16 @@ typedef struct {
                                * support BEGIN_DIR, when possible. */
   int AllowNonRFC953Hostnames; /**< If true, we allow connections to hostnames
                                 * with weird characters. */
- /** If true, we try resolving hostnames with weird characters. */
 /** If true, we try resolving hostnames with weird characters. */
   int ServerDNSAllowNonRFC953Hostnames;
 
   /** If true, we try to download extra-info documents (and we serve them,
    * if we are a cache).  For authorities, this is always true. */
   int DownloadExtraInfo;
 
+  /** DOCDOC */
+  int V3AuthVotingInterval;
+
 } or_options_t;
 
 /** Persistent state for an onion router, as saved to disk. */