diff options
author | Nick Mathewson <nickm@torproject.org> | 2014-11-13 10:03:55 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2015-05-28 10:42:29 -0400 |
commit | d4a6b1a4209f0b3995c0f61ad9cbe687e09a6fb0 (patch) | |
tree | ec37cd2cf0e293508cbacbe4fd782a12c8aa5cdf /src/or/dircollate.h | |
parent | 6c564e6c081514bab56bacec89b1f6f9457a7022 (diff) | |
download | tor-d4a6b1a4209f0b3995c0f61ad9cbe687e09a6fb0.tar.gz tor-d4a6b1a4209f0b3995c0f61ad9cbe687e09a6fb0.zip |
Implement ed25519 identity collation for voting.
This is a new collator type that follows proposal 220 for deciding
which identities to include. The rule is (approximately):
If a <ed,rsa> identity is listed by more than half of authorities,
include it. And include all <rsa> votes about that node as
matching.
Otherwise, if an <*,rsa> or <rsa> identity is listed by more than
half of the authorities, and no <ed,rsa> has been listed, include
it.
Diffstat (limited to 'src/or/dircollate.h')
-rw-r--r-- | src/or/dircollate.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/or/dircollate.h b/src/or/dircollate.h index 073b6117e7..9eba37a010 100644 --- a/src/or/dircollate.h +++ b/src/or/dircollate.h @@ -21,13 +21,15 @@ dircollator_t *dircollator_new(int n_votes, int n_authorities); void dircollator_free(dircollator_t *obj); void dircollator_add_vote(dircollator_t *dc, networkstatus_t *v); -void dircollator_collate(dircollator_t *dc); +void dircollator_collate(dircollator_t *dc, int consensus_method); int dircollator_n_routers(dircollator_t *dc); vote_routerstatus_t **dircollator_get_votes_for_router(dircollator_t *dc, int idx); #ifdef DIRCOLLATE_PRIVATE +struct ddmap_entry_s; +typedef HT_HEAD(double_digest_map, ddmap_entry_s) double_digest_map_t; struct dircollator_s { /**DOCDOC */ int is_collated; @@ -36,6 +38,9 @@ struct dircollator_s { int next_vote_num; digestmap_t *by_rsa_sha1; + struct double_digest_map by_both_ids; + + digestmap_t *by_collated_rsa_sha1; smartlist_t *all_rsa_sha1_lst; }; |