mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2025-02-25 23:21:38 +01:00
Do not add bw file line to the vote
when there are not bw file headers lines.
This commit is contained in:
parent
e5dd46beab
commit
086060e138
1 changed files with 6 additions and 2 deletions
|
@ -254,8 +254,7 @@ format_networkstatus_vote(crypto_pk_t *private_signing_key,
|
||||||
/* XXXX Abstraction violation: should be pulling a field out of v3_ns.*/
|
/* XXXX Abstraction violation: should be pulling a field out of v3_ns.*/
|
||||||
char *flag_thresholds = dirserv_get_flag_thresholds_line();
|
char *flag_thresholds = dirserv_get_flag_thresholds_line();
|
||||||
char *params;
|
char *params;
|
||||||
char *bwlist_headers = smartlist_join_strings(v3_ns->bwlist_headers,
|
char *bwlist_headers;
|
||||||
" ", 0, NULL);
|
|
||||||
authority_cert_t *cert = v3_ns->cert;
|
authority_cert_t *cert = v3_ns->cert;
|
||||||
char *methods =
|
char *methods =
|
||||||
make_consensus_method_list(MIN_SUPPORTED_CONSENSUS_METHOD,
|
make_consensus_method_list(MIN_SUPPORTED_CONSENSUS_METHOD,
|
||||||
|
@ -270,6 +269,11 @@ format_networkstatus_vote(crypto_pk_t *private_signing_key,
|
||||||
else
|
else
|
||||||
params = tor_strdup("");
|
params = tor_strdup("");
|
||||||
tor_assert(cert);
|
tor_assert(cert);
|
||||||
|
if (v3_ns->bwlist_headers)
|
||||||
|
bwlist_headers = smartlist_join_strings(v3_ns->bwlist_headers, " ", 0,
|
||||||
|
NULL);
|
||||||
|
else
|
||||||
|
bwlist_headers = tor_strdup("");
|
||||||
smartlist_add_asprintf(chunks,
|
smartlist_add_asprintf(chunks,
|
||||||
"network-status-version 3\n"
|
"network-status-version 3\n"
|
||||||
"vote-status %s\n"
|
"vote-status %s\n"
|
||||||
|
|
Loading…
Add table
Reference in a new issue