smartlist_add(proto_votes, (void*)v);
} SMARTLIST_FOREACH_END(ns);
- char *protocols = compute_protover_vote(proto_votes, threshold);
+ char *protocols = protover_compute_vote(proto_votes, threshold);
smartlist_free(proto_votes);
char *result = NULL;
* contract_protocol_list above.
*/
char *
-compute_protover_vote(const smartlist_t *list_of_proto_strings,
+protover_compute_vote(const smartlist_t *list_of_proto_strings,
int threshold)
{
smartlist_t *all_entries = smartlist_new();
int protover_is_supported_here(protocol_type_t pr, uint32_t ver);
const char *get_supported_protocols(void);
-char *compute_protover_vote(const smartlist_t *list_of_proto_strings,
+char *protover_compute_vote(const smartlist_t *list_of_proto_strings,
int threshold);
const char *protover_compute_for_old_tor(const char *version);
int protocol_list_supports_protocol(const char *list, protocol_type_t tp,
(void) arg;
smartlist_t *lst = smartlist_new();
- char *result = compute_protover_vote(lst, 1);
+ char *result = protover_compute_vote(lst, 1);
tt_str_op(result, OP_EQ, "");
tor_free(result);
smartlist_add(lst, (void*) "Foo=1-10,500 Bar=1,3-7,8");
- result = compute_protover_vote(lst, 1);
+ result = protover_compute_vote(lst, 1);
tt_str_op(result, OP_EQ, "Bar=1,3-8 Foo=1-10,500");
tor_free(result);
smartlist_add(lst, (void*) "Quux=123-456,78 Bar=2-6,8 Foo=9");
- result = compute_protover_vote(lst, 1);
+ result = protover_compute_vote(lst, 1);
tt_str_op(result, OP_EQ, "Bar=1-8 Foo=1-10,500 Quux=78,123-456");
tor_free(result);
- result = compute_protover_vote(lst, 2);
+ result = protover_compute_vote(lst, 2);
tt_str_op(result, OP_EQ, "Bar=3-6,8 Foo=9");
tor_free(result);