mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2025-02-23 22:47:12 +01:00
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
This commit is contained in:
parent
c3626cdba7
commit
3fa9a90243
2 changed files with 3 additions and 0 deletions
|
@ -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 ||
|
||||
|
|
|
@ -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. */
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue