aboutsummaryrefslogtreecommitdiff
path: root/src/or/dirvote.h
diff options
context:
space:
mode:
authorDavid Goulet <dgoulet@torproject.org>2018-04-05 11:18:47 -0400
committerDavid Goulet <dgoulet@torproject.org>2018-04-27 11:40:44 -0400
commitd177067860c1c23fd3fe109e621710560fc6c43d (patch)
tree72e0b1c3e39133d8832d9081194fd0f2ac34215e /src/or/dirvote.h
parentf0838e7257482e87a90f6844cb832a4ddf2197e5 (diff)
downloadtor-d177067860c1c23fd3fe109e621710560fc6c43d.tar.gz
tor-d177067860c1c23fd3fe109e621710560fc6c43d.zip
dirvote: Trim down the public API
Many functions become static to the C file or exposed to the tests within the PRIVATE define of dirvote.h. This commit moves a function to the top. No code behavior change. Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/or/dirvote.h')
-rw-r--r--src/or/dirvote.h42
1 files changed, 19 insertions, 23 deletions
diff --git a/src/or/dirvote.h b/src/or/dirvote.h
index 8a317deb47..dd388fd961 100644
--- a/src/or/dirvote.h
+++ b/src/or/dirvote.h
@@ -89,19 +89,6 @@
void dirvote_free_all(void);
/* vote manipulation */
-char *networkstatus_compute_consensus(smartlist_t *votes,
- int total_authorities,
- crypto_pk_t *identity_key,
- crypto_pk_t *signing_key,
- const char *legacy_identity_key_digest,
- crypto_pk_t *legacy_signing_key,
- consensus_flavor_t flavor);
-int networkstatus_add_detached_signatures(networkstatus_t *target,
- ns_detached_signatures_t *sigs,
- const char *source,
- int severity,
- const char **msg_out);
-char *networkstatus_get_detached_signatures(smartlist_t *consensuses);
void ns_detached_signatures_free_(ns_detached_signatures_t *s);
#define ns_detached_signatures_free(s) \
FREE_AND_NULL(ns_detached_signatures_t, ns_detached_signatures_free_, (s))
@@ -178,21 +165,11 @@ networkstatus_t *
dirserv_generate_networkstatus_vote_obj(crypto_pk_t *private_key,
authority_cert_t *cert);
-microdesc_t *dirvote_create_microdescriptor(const routerinfo_t *ri,
- int consensus_method);
-ssize_t dirvote_format_microdesc_vote_line(char *out, size_t out_len,
- const microdesc_t *md,
- int consensus_method_low,
- int consensus_method_high);
vote_microdesc_hash_t *dirvote_format_all_microdesc_vote_lines(
const routerinfo_t *ri,
time_t now,
smartlist_t *microdescriptors_out);
-int vote_routerstatus_find_microdesc_hash(char *digest256_out,
- const vote_routerstatus_t *vrs,
- int method,
- digest_algorithm_t alg);
document_signature_t *voter_get_sig_by_algorithm(
const networkstatus_voter_info_t *voter,
digest_algorithm_t alg);
@@ -212,6 +189,25 @@ STATIC int
networkstatus_compute_bw_weights_v10(smartlist_t *chunks, int64_t G,
int64_t M, int64_t E, int64_t D,
int64_t T, int64_t weight_scale);
+STATIC
+char *networkstatus_compute_consensus(smartlist_t *votes,
+ int total_authorities,
+ crypto_pk_t *identity_key,
+ crypto_pk_t *signing_key,
+ const char *legacy_identity_key_digest,
+ crypto_pk_t *legacy_signing_key,
+ consensus_flavor_t flavor);
+STATIC
+int networkstatus_add_detached_signatures(networkstatus_t *target,
+ ns_detached_signatures_t *sigs,
+ const char *source,
+ int severity,
+ const char **msg_out);
+STATIC
+char *networkstatus_get_detached_signatures(smartlist_t *consensuses);
+STATIC microdesc_t *dirvote_create_microdescriptor(const routerinfo_t *ri,
+ int consensus_method);
+
#endif /* defined(DIRVOTE_PRIVATE) */
#endif /* !defined(TOR_DIRVOTE_H) */