diff options
author | David Goulet <dgoulet@torproject.org> | 2016-05-03 11:36:09 -0400 |
---|---|---|
committer | David Goulet <dgoulet@torproject.org> | 2016-07-01 14:01:41 -0400 |
commit | 0c26a6db7e683c23505c1c9187fd538c7b80ce31 (patch) | |
tree | a1ad7d2b48935a5f02a0abdf520e4e81a02f1268 /src/or/directory.c | |
parent | ca6ceec112f05ce68097429089ee428010c8b8d0 (diff) | |
download | tor-0c26a6db7e683c23505c1c9187fd538c7b80ce31.tar.gz tor-0c26a6db7e683c23505c1c9187fd538c7b80ce31.zip |
prop250: Parse votes and consensus
One of the last piece that parses the votes and consensus in order to update
our state and make decision for the SR values.
We need to inform the SR subsystem when we set the current consensus because
this can be called when loaded from file or downloaded from other authorities
or computed.
The voting schedule is used for the SR timings since we are bound to the
voting system.
Signed-off-by: David Goulet <dgoulet@torproject.org>
Signed-off-by: George Kadianakis <desnacked@riseup.net>
Diffstat (limited to 'src/or/directory.c')
-rw-r--r-- | src/or/directory.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/or/directory.c b/src/or/directory.c index 876eaa4415..b32090aec7 100644 --- a/src/or/directory.c +++ b/src/or/directory.c @@ -30,6 +30,7 @@ #include "routerlist.h" #include "routerparse.h" #include "routerset.h" +#include "shared_random.h" #if defined(EXPORTMALLINFO) && defined(HAVE_MALLOC_H) && defined(HAVE_MALLINFO) #ifndef OPENBSD @@ -2026,6 +2027,10 @@ connection_dir_client_reached_eof(dir_connection_t *conn) update_microdescs_from_networkstatus(now); update_microdesc_downloads(now); directory_info_has_arrived(now, 0, 0); + if (authdir_mode_v3(get_options())) { + sr_act_post_consensus( + networkstatus_get_latest_consensus_by_flavor(FLAV_NS)); + } log_info(LD_DIR, "Successfully loaded consensus."); } |