mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-30 23:53:32 +01:00
Automatically generate md-con method vers in test
This commit is contained in:
parent
21654ca7bd
commit
185c93c954
@ -78,6 +78,7 @@ dir_common_gen_routerstatus_for_v3ns(int idx, time_t now)
|
|||||||
vote_routerstatus_t *vrs=NULL;
|
vote_routerstatus_t *vrs=NULL;
|
||||||
routerstatus_t *rs = NULL;
|
routerstatus_t *rs = NULL;
|
||||||
tor_addr_t addr_ipv6;
|
tor_addr_t addr_ipv6;
|
||||||
|
char *method_list = NULL;
|
||||||
|
|
||||||
switch (idx) {
|
switch (idx) {
|
||||||
case 0:
|
case 0:
|
||||||
@ -154,13 +155,17 @@ dir_common_gen_routerstatus_for_v3ns(int idx, time_t now)
|
|||||||
}
|
}
|
||||||
if (vrs) {
|
if (vrs) {
|
||||||
vrs->microdesc = tor_malloc_zero(sizeof(vote_microdesc_hash_t));
|
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,
|
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",
|
"sha256=xyzajkldsdsajdadlsdjaslsdksdjlsdjsdaskdaaa%d\n",
|
||||||
idx);
|
method_list, idx);
|
||||||
}
|
}
|
||||||
|
|
||||||
done:
|
done:
|
||||||
|
tor_free(method_list);
|
||||||
return vrs;
|
return vrs;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user