From e73fb2f102c714b96436d594a298566c6e8393f6 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Tue, 11 Sep 2007 20:17:28 +0000 Subject: 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 --- src/or/dirvote.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/or/dirvote.c') 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 consensus, check every * as-yet-unchecked signature on 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 target 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."); -- cgit v1.2.3-54-g00ecf