diff options
author | Nick Mathewson <nickm@torproject.org> | 2016-03-21 13:26:04 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2016-03-21 13:26:04 -0400 |
commit | 6a91cab79c23b47c48e35e95661dfbe81be943dd (patch) | |
tree | 93d7ca081f783de358579a3e8ab43dbbd3d19565 /src/or/dircollate.h | |
parent | c83bcc358437660471abdc11ed9e12585674e0d6 (diff) | |
parent | e1e62f9d5735da64dc1435d3a40db77f6229766a (diff) | |
download | tor-6a91cab79c23b47c48e35e95661dfbe81be943dd.tar.gz tor-6a91cab79c23b47c48e35e95661dfbe81be943dd.zip |
Merge branch 'maint-0.2.7'
Diffstat (limited to 'src/or/dircollate.h')
-rw-r--r-- | src/or/dircollate.h | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/src/or/dircollate.h b/src/or/dircollate.h index 8d4dc2cabe..358c730cbb 100644 --- a/src/or/dircollate.h +++ b/src/or/dircollate.h @@ -5,8 +5,8 @@ /* See LICENSE for licensing information */ /** - * \file dirvote.h - * \brief Header file for dirvote.c. + * \file dircollate.h + * \brief Header file for dircollate.c. **/ #ifndef TOR_DIRCOLLATE_H @@ -30,18 +30,36 @@ vote_routerstatus_t **dircollator_get_votes_for_router(dircollator_t *dc, #ifdef DIRCOLLATE_PRIVATE struct ddmap_entry_s; typedef HT_HEAD(double_digest_map, ddmap_entry_s) double_digest_map_t; +/** A dircollator keeps track of all the routerstatus entries in a + * set of networkstatus votes, and matches them by an appropriate rule. */ struct dircollator_s { - /**DOCDOC */ + /** True iff we have run the collation algorithm. */ int is_collated; + /** The total number of votes that we received. */ int n_votes; + /** The total number of authorities we acknowledge. */ int n_authorities; + /** The index which the next vote to be added to this collator should + * receive. */ int next_vote_num; + /** Map from RSA-SHA1 identity digest to an array of <b>n_votes</b> + * vote_routerstatus_t* pointers, such that the i'th member of the + * array is the i'th vote's entry for that RSA-SHA1 ID.*/ digestmap_t *by_rsa_sha1; + /** Map from <ed, RSA-SHA1> pair to an array similar to that used in + * by_rsa_sha1 above. We include <NULL,RSA-SHA1> entries for votes that + * say that there is no Ed key. */ struct double_digest_map by_both_ids; + /** One of two outputs created by collation: a map from RSA-SHA1 + * identity digest to an array of the vote_routerstatus_t objects. Entries + * only exist in this map for identities that we should include in the + * consensus. */ digestmap_t *by_collated_rsa_sha1; + /** One of two outputs created by collation: a sorted array of RSA-SHA1 + * identity digests .*/ smartlist_t *all_rsa_sha1_lst; }; #endif |