From 3fa9a90243de3cd87e78917f97a0442d76434be0 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Wed, 13 Jun 2007 19:06:26 +0000 Subject: r13396@catbus: nickm | 2007-06-13 15:06:18 -0400 Set vote_digest field prproperly in networkstatus_vote_t, so that it gets conveyed to the consensus correctly. svn:r10590 --- src/or/routerparse.c | 2 ++ src/or/test.c | 1 + 2 files changed, 3 insertions(+) (limited to 'src') diff --git a/src/or/routerparse.c b/src/or/routerparse.c index e1b52e7198..7604cb6f63 100644 --- a/src/or/routerparse.c +++ b/src/or/routerparse.c @@ -1883,6 +1883,8 @@ networkstatus_parse_vote_from_string(const char *s, int is_vote) if (voter) smartlist_add(ns->voters, voter); voter = tor_malloc_zero(sizeof(networkstatus_voter_info_t)); + if (is_vote) + memcpy(voter->vote_digest, ns_digest, DIGEST_LEN); voter->nickname = tor_strdup(tok->args[0]); if (strlen(tok->args[1]) != HEX_DIGEST_LEN || diff --git a/src/or/test.c b/src/or/test.c index 4b637da983..8d64ee000e 100644 --- a/src/or/test.c +++ b/src/or/test.c @@ -2389,6 +2389,7 @@ test_v3_networkstatus(void) test_assert(consensus_text); consensus = networkstatus_parse_vote_from_string(consensus_text, 0); test_assert(consensus); + // log_notice(LD_GENERAL, "<<%s>>", consensus_text); /* XXXX020 check consensus contents. */ -- cgit v1.2.3-54-g00ecf