diff options
author | Nick Mathewson <nickm@torproject.org> | 2016-05-09 20:10:43 -0400 |
---|---|---|
committer | David Goulet <dgoulet@torproject.org> | 2016-07-01 14:01:42 -0400 |
commit | 6927467bef1b5c46b85d30ac77b364ed407f6d72 (patch) | |
tree | 443f428f611c01150ba6e7eb5dd868305e0a85fb /src/or/dirvote.h | |
parent | 09ecbdd8eef02228764018250b00ae8d8b64bb97 (diff) | |
download | tor-6927467bef1b5c46b85d30ac77b364ed407f6d72.tar.gz tor-6927467bef1b5c46b85d30ac77b364ed407f6d72.zip |
Refactor parameter computation and add a helper function
This patch makes us retain the intermediate list of K=V entries for
the duration of computing our vote, and lets us use that list with
a new function in order to look up parameters before the consensus
is published.
We can't actually use this function yet because of #19011: our
existing code to do this doesn't actually work, and we'll need a new
consensus method to start using it.
Closes ticket #19012.
Diffstat (limited to 'src/or/dirvote.h')
-rw-r--r-- | src/or/dirvote.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/or/dirvote.h b/src/or/dirvote.h index 4c563aa5b2..2a83802307 100644 --- a/src/or/dirvote.h +++ b/src/or/dirvote.h @@ -210,9 +210,13 @@ document_signature_t *voter_get_sig_by_algorithm( digest_algorithm_t alg); #ifdef DIRVOTE_PRIVATE +STATIC int32_t dirvote_get_intermediate_param_value( + const smartlist_t *param_list, + const char *keyword, + int32_t default_val); STATIC char *format_networkstatus_vote(crypto_pk_t *private_key, networkstatus_t *v3_ns); -STATIC char *dirvote_compute_params(smartlist_t *votes, int method, +STATIC smartlist_t *dirvote_compute_params(smartlist_t *votes, int method, int total_authorities); STATIC char *compute_consensus_package_lines(smartlist_t *votes); STATIC char *make_consensus_method_list(int low, int high, const char *sep); |