diff options
author | Roger Dingledine <arma@torproject.org> | 2009-10-26 22:45:12 -0400 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2009-10-26 22:45:12 -0400 |
commit | ad525685f65aabf134b67923baadc98affe1a42d (patch) | |
tree | 1da6521be15e24120847811a36a0b8718bcbb413 /src | |
parent | 698aaeb1787c18723407ebcfdd4172826f0ded5b (diff) | |
parent | 4256a964618ea48a34d900b6c77fc6d7f97138cb (diff) | |
download | tor-ad525685f65aabf134b67923baadc98affe1a42d.tar.gz tor-ad525685f65aabf134b67923baadc98affe1a42d.zip |
Merge commit 'karsten/fix-1066-3'
Diffstat (limited to 'src')
-rw-r--r-- | src/or/dirvote.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/or/dirvote.c b/src/or/dirvote.c index 5ce3fd2ca7..65d7c477eb 100644 --- a/src/or/dirvote.c +++ b/src/or/dirvote.c @@ -2304,7 +2304,7 @@ static int dirvote_compute_consensuses(void) { /* Have we got enough votes to try? */ - int n_votes, n_voters; + int n_votes, n_voters, n_vote_running = 0; smartlist_t *votes = NULL, *votestrings = NULL; char *consensus_body = NULL, *signatures = NULL, *votefile; networkstatus_t *consensus = NULL; @@ -2324,6 +2324,19 @@ dirvote_compute_consensuses(void) "%d of %d", n_votes, n_voters/2); goto err; } + tor_assert(pending_vote_list); + SMARTLIST_FOREACH(pending_vote_list, pending_vote_t *, v, { + if (smartlist_string_isin(v->vote->known_flags, "Running")) + n_vote_running++; + }); + if (!n_vote_running) { + /* See task 1066. */ + log_warn(LD_DIR, "Nobody has voted on the Running flag. Generating " + "and publishing a consensus without Running nodes " + "would make many clients stop working. Not " + "generating a consensus!"); + goto err; + } if (!(my_cert = get_my_v3_authority_cert())) { log_warn(LD_DIR, "Can't generate consensus without a certificate."); |