typedef struct vote_microdesc_hash_t {
/** Next element in the list, or NULL. */
struct vote_microdesc_hash_t *next;
- /** The raw contents of the microdesc hash line, excluding the "m". */
+ /** The raw contents of the microdesc hash line, from the "m" through the
+ * newline. */
char *microdesc_hash_line;
} vote_microdesc_hash_t;
/* Shouldn't happen */
test_assert(0);
}
+ if (vrs) {
+ vrs->microdesc = tor_malloc_zero(sizeof(vote_microdesc_hash_t));
+ tor_asprintf(&vrs->microdesc->microdesc_hash_line,
+ "m 9,10,11,12,13,14,15,16,17 "
+ "sha256=xyzajkldsdsajdadlsdjaslsdksdjlsdjsdaskdaaa%d\n",
+ idx);
+ }
done:
return vrs;
/* Shouldn't happen */
test_assert(0);
}
+ if (vrs) {
+ vrs->microdesc = tor_malloc_zero(sizeof(vote_microdesc_hash_t));
+ tor_asprintf(&vrs->microdesc->microdesc_hash_line,
+ "m 9,10,11,12,13,14,15,16,17 "
+ "sha256=xyzajkldsdsajdadlsdjaslsdksdjlsdjsdaskdaaa%d\n",
+ idx);
+ }
done:
return vrs;