tor

The Tor anonymity network
git clone https://git.dasho.dev/tor.git
Log | Files | Refs | README | LICENSE

commit 75ad1a1f2fca79dd2e48cfe1416d21a2b82b76b6
parent 042a9fd8b008ad004c2a11ed18298b5cd3b60a37
Author: Nick Mathewson <nickm@torproject.org>
Date:   Tue, 11 Sep 2018 13:16:49 -0400

Merge remote-tracking branch 'onionk/doublevote1'

Diffstat:
Msrc/test/test_protover.c | 8++++++++
1 file changed, 8 insertions(+), 0 deletions(-)

diff --git a/src/test/test_protover.c b/src/test/test_protover.c @@ -167,6 +167,14 @@ test_protover_vote(void *arg) tt_str_op(result, OP_EQ, ""); tor_free(result); + /* Don't count double-voting. */ + smartlist_clear(lst); + smartlist_add(lst, (void*) "Foo=1 Foo=1"); + smartlist_add(lst, (void*) "Bar=1-2,2-3"); + result = protover_compute_vote(lst, 2); + tt_str_op(result, OP_EQ, ""); + tor_free(result); + /* Bad votes: the result must be empty */ smartlist_clear(lst); smartlist_add(lst, (void*) "Faux=10-5");