diff options
author | teor <teor2345@gmail.com> | 2014-12-20 21:53:00 +1100 |
---|---|---|
committer | teor <teor2345@gmail.com> | 2014-12-24 06:13:32 +1100 |
commit | 1ee41b3eef4b5e561c7c73e79885fe858dac6d80 (patch) | |
tree | 0a751121774b65ef5a82b0a526eea51534000a52 /src/or/router.c | |
parent | 083c58f126a4390b96b0e3f14d809502d8702f3d (diff) | |
download | tor-1ee41b3eef4b5e561c7c73e79885fe858dac6d80.tar.gz tor-1ee41b3eef4b5e561c7c73e79885fe858dac6d80.zip |
Allow consensus interval of 10 seconds when testing
Decrease minimum consensus interval to 10 seconds
when TestingTorNetwork is set. (Or 5 seconds for
the first consensus.)
Fix code that assumes larger interval values.
This assists in quickly bootstrapping a testing
Tor network.
Fixes bugs 13718 & 13823.
Diffstat (limited to 'src/or/router.c')
-rw-r--r-- | src/or/router.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/or/router.c b/src/or/router.c index 56bb909952..bad5242603 100644 --- a/src/or/router.c +++ b/src/or/router.c @@ -1223,6 +1223,11 @@ router_orport_found_reachable(void) " Publishing server descriptor." : ""); can_reach_or_port = 1; mark_my_descriptor_dirty("ORPort found reachable"); + /* This is a significant enough change to upload immediately, + * at least in a test network */ + if (get_options()->TestingTorNetwork == 1) { + reschedule_descriptor_update_check(); + } control_event_server_status(LOG_NOTICE, "REACHABILITY_SUCCEEDED ORADDRESS=%s:%d", address, me->or_port); @@ -1240,8 +1245,14 @@ router_dirport_found_reachable(void) log_notice(LD_DIRSERV,"Self-testing indicates your DirPort is reachable " "from the outside. Excellent."); can_reach_dir_port = 1; - if (decide_to_advertise_dirport(get_options(), me->dir_port)) + if (decide_to_advertise_dirport(get_options(), me->dir_port)) { mark_my_descriptor_dirty("DirPort found reachable"); + /* This is a significant enough change to upload immediately, + * at least in a test network */ + if (get_options()->TestingTorNetwork == 1) { + reschedule_descriptor_update_check(); + } + } control_event_server_status(LOG_NOTICE, "REACHABILITY_SUCCEEDED DIRADDRESS=%s:%d", address, me->dir_port); |