diff options
Diffstat (limited to 'src/or/shared_random.h')
-rw-r--r-- | src/or/shared_random.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/or/shared_random.h b/src/or/shared_random.h index 878bfbff45..f1fbe273f1 100644 --- a/src/or/shared_random.h +++ b/src/or/shared_random.h @@ -101,13 +101,15 @@ typedef struct sr_commit_t { int sr_init(int save_to_disk); void sr_save_and_cleanup(void); +sr_commit_t *sr_parse_commit(const smartlist_t *args); +sr_srv_t *sr_parse_srv(const smartlist_t *args); +char *sr_get_string_for_vote(void); +char *sr_get_string_for_consensus(const smartlist_t *votes); void sr_commit_free(sr_commit_t *commit); void sr_srv_encode(char *dst, const sr_srv_t *srv); /* Private methods (only used by shared_random_state.c): */ -sr_commit_t *sr_parse_commit(const smartlist_t *args); -sr_srv_t *sr_parse_srv(const smartlist_t *args); void sr_compute_srv(void); sr_commit_t *sr_generate_our_commit(time_t timestamp, const authority_cert_t *my_rsa_cert); @@ -123,6 +125,9 @@ STATIC int reveal_decode(const char *encoded, sr_commit_t *commit); STATIC int commit_has_reveal_value(const sr_commit_t *commit); +STATIC sr_srv_t *get_majority_srv_from_votes(const smartlist_t *votes, + int current); + #endif /* SHARED_RANDOM_PRIVATE */ #endif /* TOR_SHARED_RANDOM_H */ |