[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [tor/release-0.3.2] Merge branch 'maint-0.3.1' into maint-0.3.2
commit d0b75b5ade6713373e97fdbd563b8ffaf14f237b
Merge: 3300a6e93 7df28ce29
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date: Mon Nov 13 12:27:36 2017 -0500
Merge branch 'maint-0.3.1' into maint-0.3.2
changes/bug24262 | 3 +++
src/or/hs_common.c | 2 +-
2 files changed, 4 insertions(+), 1 deletion(-)
diff --cc src/or/hs_common.c
index f79aeb598,7cef5a8e2..a0f2af29c
--- a/src/or/hs_common.c
+++ b/src/or/hs_common.c
@@@ -213,18 -56,7 +213,18 @@@ hs_check_service_private_dir(const cha
STATIC uint64_t
get_time_period_length(void)
{
+ /* If we are on a test network, make the time period smaller than normal so
+ that we actually see it rotate. Specifically, make it the same length as
+ an SRV protocol run. */
+ if (get_options()->TestingTorNetwork) {
+ unsigned run_duration = sr_state_get_protocol_run_duration();
+ /* An SRV run should take more than a minute (it's 24 rounds) */
+ tor_assert_nonfatal(run_duration > 60);
+ /* Turn it from seconds to minutes before returning: */
+ return sr_state_get_protocol_run_duration() / 60;
+ }
+
- int32_t time_period_length = networkstatus_get_param(NULL, "hsdir-interval",
+ int32_t time_period_length = networkstatus_get_param(NULL, "hsdir_interval",
HS_TIME_PERIOD_LENGTH_DEFAULT,
HS_TIME_PERIOD_LENGTH_MIN,
HS_TIME_PERIOD_LENGTH_MAX);
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits