summaryrefslogtreecommitdiff
path: root/src/or/dirvote.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2013-02-04 13:44:05 -0500
committerNick Mathewson <nickm@torproject.org>2013-02-04 13:44:05 -0500
commitcd4ad45ba31f4ae08aa185f358ee56721a06170b (patch)
treeb2ab06cca25a182ecb851a153c6fed01638163d2 /src/or/dirvote.c
parent12f2d986f327de281cb70377a7cf926b0f40f4e4 (diff)
downloadtor-cd4ad45ba31f4ae08aa185f358ee56721a06170b.tar.gz
tor-cd4ad45ba31f4ae08aa185f358ee56721a06170b.zip
Include a flag-thresholds line in each vote to describe flag cutoffs
Implements ticket 8151.
Diffstat (limited to 'src/or/dirvote.c')
-rw-r--r--src/or/dirvote.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/or/dirvote.c b/src/or/dirvote.c
index aee9a6edfe..43b9f5eb12 100644
--- a/src/or/dirvote.c
+++ b/src/or/dirvote.c
@@ -134,6 +134,8 @@ format_networkstatus_vote(crypto_pk_t *private_signing_key,
char fu[ISO_TIME_LEN+1];
char vu[ISO_TIME_LEN+1];
char *flags = smartlist_join_strings(v3_ns->known_flags, " ", 0, NULL);
+ /* XXXX Abstraction violation: should be pulling a field out of v3_ns.*/
+ char *flag_thresholds = dirserv_get_flag_thresholds_line();
char *params;
authority_cert_t *cert = v3_ns->cert;
char *methods =
@@ -160,6 +162,7 @@ format_networkstatus_vote(crypto_pk_t *private_signing_key,
"voting-delay %d %d\n"
"%s" /* versions */
"known-flags %s\n"
+ "flag-thresholds %s\n"
"params %s\n"
"dir-source %s %s %s %s %d %d\n"
"contact %s\n",
@@ -169,6 +172,7 @@ format_networkstatus_vote(crypto_pk_t *private_signing_key,
v3_ns->vote_seconds, v3_ns->dist_seconds,
version_lines,
flags,
+ flag_thresholds,
params,
voter->nickname, fingerprint, voter->address,
fmt_addr32(addr), voter->dir_port, voter->or_port,
@@ -181,6 +185,7 @@ format_networkstatus_vote(crypto_pk_t *private_signing_key,
tor_free(params);
tor_free(flags);
+ tor_free(flag_thresholds);
tor_free(methods);
outp = status + strlen(status);
endp = status + len;