diff options
author | Nick Mathewson <nickm@torproject.org> | 2007-09-11 20:17:28 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2007-09-11 20:17:28 +0000 |
commit | e73fb2f102c714b96436d594a298566c6e8393f6 (patch) | |
tree | 058bc89abadea3586fa965b689979a553392c191 /src/or/dirvote.c | |
parent | 4de4f53abd0d5dc5b39e4756b777e71ea846992d (diff) | |
download | tor-e73fb2f102c714b96436d594a298566c6e8393f6.tar.gz tor-e73fb2f102c714b96436d594a298566c6e8393f6.zip |
r15049@catbus: nickm | 2007-09-11 16:05:50 -0400
When we get a consensus for which we are missing the right certificates, keep it around pending more certificates; do not just drop it.
svn:r11430
Diffstat (limited to 'src/or/dirvote.c')
-rw-r--r-- | src/or/dirvote.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/or/dirvote.c b/src/or/dirvote.c index c39cff866a..634f7f9419 100644 --- a/src/or/dirvote.c +++ b/src/or/dirvote.c @@ -735,7 +735,7 @@ networkstatus_check_voter_signature(networkstatus_vote_t *consensus, /** Given a v3 networkstatus consensus in <b>consensus</b>, check every * as-yet-unchecked signature on <b>consensus. Return 0 if there are enough * good signatures from recognized authorities on it, and -1 otherwise. - * DOCDOC warn. */ + * DOCDOC warn. DOCDOC -2 rerturn. */ int networkstatus_check_consensus_signature(networkstatus_vote_t *consensus, int warn) @@ -832,8 +832,10 @@ networkstatus_check_consensus_signature(networkstatus_vote_t *consensus, if (n_good >= n_required) return 0; - else + else if (n_good + n_missing_key >= n_required) return -1; + else + return -2; } /** Given a consensus vote <b>target</b> and a list of @@ -1681,7 +1683,7 @@ dirvote_publish_consensus(void) return -1; } - if (networkstatus_set_current_consensus(pending_consensus_body, 0)) + if (networkstatus_set_current_consensus(pending_consensus_body, 0, 0)) log_warn(LD_DIR, "Error publishing consensus"); else log_warn(LD_DIR, "Consensus published."); |