diff options
author | Nick Mathewson <nickm@torproject.org> | 2013-04-02 12:45:12 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2013-04-18 11:04:58 -0400 |
commit | 0f83fcc5c239776211d0c111c628a7f95a802808 (patch) | |
tree | 3861884b840977e1f1cae742b4b0f01a50bdcd4a /src/or | |
parent | 6706a05b795135ea4035c36fb3c57ecff0f815fc (diff) | |
download | tor-0f83fcc5c239776211d0c111c628a7f95a802808.tar.gz tor-0f83fcc5c239776211d0c111c628a7f95a802808.zip |
Add a quick-and-dirty-test for generate_v2_networkstatus.
It sure is a good thing we can run each test in its own process, or
else the amount of setup I needed to do to make this thing work
would have broken all the other tests.
Test mocking would have made this easier to write too.
Diffstat (limited to 'src/or')
-rw-r--r-- | src/or/dirserv.c | 2 | ||||
-rw-r--r-- | src/or/dirserv.h | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/src/or/dirserv.c b/src/or/dirserv.c index 2bbfc9a7c6..173c8cd14a 100644 --- a/src/or/dirserv.c +++ b/src/or/dirserv.c @@ -2904,7 +2904,7 @@ dirserv_generate_networkstatus_vote_obj(crypto_pk_t *private_key, /** For v2 authoritative directories only: Replace the contents of * <b>the_v2_networkstatus</b> with a newly generated network status * object. */ -static cached_dir_t * +cached_dir_t * generate_v2_networkstatus_opinion(void) { cached_dir_t *r = NULL; diff --git a/src/or/dirserv.h b/src/or/dirserv.h index a71ac7db04..cc4ac2e0a4 100644 --- a/src/or/dirserv.h +++ b/src/or/dirserv.h @@ -120,6 +120,7 @@ int measured_bw_line_parse(measured_bw_line_t *out, const char *line); int measured_bw_line_apply(measured_bw_line_t *parsed_line, smartlist_t *routerstatuses); +cached_dir_t *generate_v2_networkstatus_opinion(void); #endif int dirserv_read_measured_bandwidths(const char *from_file, |