diff options
author | Matthew Finkel <Matthew.Finkel@gmail.com> | 2015-05-27 08:29:34 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2015-12-18 13:14:10 -0500 |
commit | 185c93c954ae6b0887dab20f6680ee0b82538a81 (patch) | |
tree | 6164f1d718ef531acc7df34551502e7ccaf950e2 /src/test/test_dir_common.c | |
parent | 21654ca7bd4ef7c7343af03670271e2b02535614 (diff) | |
download | tor-185c93c954ae6b0887dab20f6680ee0b82538a81.tar.gz tor-185c93c954ae6b0887dab20f6680ee0b82538a81.zip |
Automatically generate md-con method vers in test
Diffstat (limited to 'src/test/test_dir_common.c')
-rw-r--r-- | src/test/test_dir_common.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/test/test_dir_common.c b/src/test/test_dir_common.c index 59d2ae4dd3..5c899a9d15 100644 --- a/src/test/test_dir_common.c +++ b/src/test/test_dir_common.c @@ -78,6 +78,7 @@ dir_common_gen_routerstatus_for_v3ns(int idx, time_t now) vote_routerstatus_t *vrs=NULL; routerstatus_t *rs = NULL; tor_addr_t addr_ipv6; + char *method_list = NULL; switch (idx) { case 0: @@ -154,13 +155,17 @@ dir_common_gen_routerstatus_for_v3ns(int idx, time_t now) } if (vrs) { vrs->microdesc = tor_malloc_zero(sizeof(vote_microdesc_hash_t)); + method_list = make_consensus_method_list(MIN_SUPPORTED_CONSENSUS_METHOD, + MAX_SUPPORTED_CONSENSUS_METHOD, + ","); tor_asprintf(&vrs->microdesc->microdesc_hash_line, - "m 9,10,11,12,13,14,15,16,17,18,19 " + "m %s " "sha256=xyzajkldsdsajdadlsdjaslsdksdjlsdjsdaskdaaa%d\n", - idx); + method_list, idx); } done: + tor_free(method_list); return vrs; } |