summaryrefslogtreecommitdiff
path: root/src/or/dircollate.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2016-03-21 13:25:12 -0400
committerNick Mathewson <nickm@torproject.org>2016-03-21 13:25:12 -0400
commite1e62f9d5735da64dc1435d3a40db77f6229766a (patch)
tree70654c50b0e9d80c855f3a9868ad3c4a15c53235 /src/or/dircollate.h
parent920e3d6a191486a5879aa0f2e0bfcf743d075c12 (diff)
parent2f2fba8a918674b7187a5b497bb156b79aaec4e1 (diff)
downloadtor-e1e62f9d5735da64dc1435d3a40db77f6229766a.tar.gz
tor-e1e62f9d5735da64dc1435d3a40db77f6229766a.zip
Merge branch 'ed25519_voting_fixes_squashed' into maint-0.2.7
Diffstat (limited to 'src/or/dircollate.h')
-rw-r--r--src/or/dircollate.h24
1 files changed, 21 insertions, 3 deletions
diff --git a/src/or/dircollate.h b/src/or/dircollate.h
index cd1e8ac96d..d7f17ef757 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