summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2008-06-14 16:11:37 +0000
committerNick Mathewson <nickm@torproject.org>2008-06-14 16:11:37 +0000
commit96bf9cd4c5923882580ab6d5a6fb4dbd9518e4d5 (patch)
treebdf01d5abb6f6b8added5e1fcaf4cc45c2962959
parent0831cc3dbcb89fc356c69ced54374aaebbb4fd39 (diff)
downloadtor-96bf9cd4c5923882580ab6d5a6fb4dbd9518e4d5.tar.gz
tor-96bf9cd4c5923882580ab6d5a6fb4dbd9518e4d5.zip
Comments and doc tweaks on Karsten's testing-dir-networks patch
svn:r15254
-rw-r--r--doc/tor.1.in4
-rw-r--r--src/or/config.c8
-rw-r--r--src/or/or.h22
3 files changed, 25 insertions, 9 deletions
diff --git a/doc/tor.1.in b/doc/tor.1.in
index b38415304f..b46443451d 100644
--- a/doc/tor.1.in
+++ b/doc/tor.1.in
@@ -1346,7 +1346,9 @@ the first consensus has been created. Changing this requires that
.LP
.TP
\fBDirTimeToLearnReachability\fR \fR\fIN\fR \fBminutes\fR|\fBhours\fP
-Consider routers as Running this time after starting an authority.
+After starting as an authority, do not make claims about whether routers are
+Running until this much time has passed.
+Changing this requires that\fBTestingTorNetwork\fR is set.
(Default: 30 minutes)
.LP
.TP
diff --git a/src/or/config.c b/src/or/config.c
index 0cd40a3985..b8669e9ac8 100644
--- a/src/or/config.c
+++ b/src/or/config.c
@@ -3382,6 +3382,8 @@ options_validate(or_options_t *old_options, or_options_t *options,
"a non-default set of DirServers.");
}
+ /*XXXX021 checking for defaults manually like this is a bit fragile.*/
+
/* Keep changes to hard-coded values synchronous to man page and default
* values table. */
if (options->V3AuthInitialVotingInterval != 30*60 &&
@@ -3891,6 +3893,12 @@ options_init_from_string(const char *cf,
* for a list of dependent config options, re-initialize newoptions
* with the new defaults, and assign all options to it second time. */
if (newoptions->TestingTorNetwork) {
+ /* XXXX021 this is a bit of a kludge. perhaps there's a better way to do
+ * this? We could, for example, make the parsing algorithm do two passes
+ * over the configuration. If it finds any "suite" options like
+ * TestingTorNetwork, it could change the defaults before its second pass.
+ * Not urgent so long as this seems to work, but at any sign of trouble,
+ * let's clean it up. -NM */
/* Change defaults. */
int i;
diff --git a/src/or/or.h b/src/or/or.h
index 456276c346..b7d6e1371f 100644
--- a/src/or/or.h
+++ b/src/or/or.h
@@ -2355,24 +2355,30 @@ typedef struct {
* migration purposes? */
int V3AuthUseLegacyKey;
- /** The length of time that we think an initial consensus should be
- * fresh. */
+ /*XXXX021 I think all these "Testing Networks only" options should perhaps
+ * have a common prefix. -NM */
+ /** The length of time that we think an initial consensus should be fresh.
+ * Only altered on testing networks. */
int V3AuthInitialVotingInterval;
- /** The length of time we think it will take to distribute initial
- * votes. */
+ /** The length of time we think it will take to distribute initial votes.
+ * Only altered on testing networks. */
int V3AuthInitialVoteDelay;
/** The length of time we think it will take to distribute initial
- * signatures. */
+ * signatures. Only altered on testing networks.*/
int V3AuthInitialDistDelay;
- /** If an authority has been around for less than this amount of time,
- * its reachability information is not accurate. */
+ /*XXXX021 why is this not prefixed to indicate that it's an authority
+ * option? */
+ /** If an authority has been around for less than this amount of time, it
+ * does not believe its reachability information is accurate. Only
+ * altered on testing networks. */
int DirTimeToLearnReachability;
/** Clients don't download any descriptor this recent, since it will
- * probably not have propagated to enough caches. */
+ * probably not have propagated to enough caches. Only altered on testing
+ * networks. */
int EstimatedDescriptorPropagationTime;
/** If true, we take part in a testing network. Change the defaults of a