summaryrefslogtreecommitdiff
path: root/tests/t_clean.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/t_clean.c')
-rw-r--r--tests/t_clean.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/tests/t_clean.c b/tests/t_clean.c
index 7eca9aa..2fadd03 100644
--- a/tests/t_clean.c
+++ b/tests/t_clean.c
@@ -11,7 +11,7 @@
11#include "trackerlogic.h" 11#include "trackerlogic.h"
12#include "test.h" 12#include "test.h"
13 13
14/* A clock stepped backwards used to leave peer_list->base in the future, so 14/* A clock stepped backwards used to leave the torrent's base in the future, so
15 the span the cleaner works from came out negative. It was then added to a 15 the span the cleaner works from came out negative. It was then added to a
16 peer's age and stored in the single byte that age lives in, where -1 reads 16 peer's age and stored in the single byte that age lives in, where -1 reads
17 as 255 and the next pass threw the whole swarm away. */ 17 as 255 and the next pass threw the whole swarm away. */
@@ -60,14 +60,12 @@ static ot_torrent *torrent_of(ot_hash *hash) {
60 60
61/* What a clock stepped back by `minutes` leaves behind */ 61/* What a clock stepped back by `minutes` leaves behind */
62static void step_clock_back(ot_torrent *torrent, int minutes) { 62static void step_clock_back(ot_torrent *torrent, int minutes) {
63 torrent->peer_list6->base += minutes; 63 torrent->base += minutes;
64 torrent->peer_list4->base += minutes;
65} 64}
66 65
67/* What the next minute of a well behaved clock looks like */ 66/* What the next minute of a well behaved clock looks like */
68static void age_by_a_minute(ot_torrent *torrent) { 67static void age_by_a_minute(ot_torrent *torrent) {
69 torrent->peer_list6->base -= 1; 68 torrent->base -= 1;
70 torrent->peer_list4->base -= 1;
71} 69}
72 70
73static void case_a_clock_that_went_back_keeps_the_swarm(void) { 71static void case_a_clock_that_went_back_keeps_the_swarm(void) {