aboutsummaryrefslogtreecommitdiff
path: root/src/test/test_hs_common.c
diff options
context:
space:
mode:
authorDavid Goulet <dgoulet@torproject.org>2017-09-06 10:25:21 -0400
committerGeorge Kadianakis <desnacked@riseup.net>2017-09-08 19:06:56 +0300
commitb586de78e37425c3f4b79fb0da32971ed5216401 (patch)
tree36b980dbca571cbde86a2ec3baffb20b76f357c3 /src/test/test_hs_common.c
parent72c7f81459e087e2a0485361eb34db1023d12155 (diff)
downloadtor-b586de78e37425c3f4b79fb0da32971ed5216401.tar.gz
tor-b586de78e37425c3f4b79fb0da32971ed5216401.zip
prop224: Use fetch and store HSDir indexes.
Based on our #23387 findings, it seems like to maintain 24/7 reachability we need to employ different logic when computing hsdir indices for fetching vs storing. That's to guarantee that the client will always fetch the current descriptor, while the service will always publish two descriptors aiming to cover all possible edge cases. For more details see the next commit and the spec branch. Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/test/test_hs_common.c')
-rw-r--r--src/test/test_hs_common.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test/test_hs_common.c b/src/test/test_hs_common.c
index 9980892951..675c45ea80 100644
--- a/src/test/test_hs_common.c
+++ b/src/test/test_hs_common.c
@@ -390,8 +390,8 @@ helper_add_hsdir_to_networkstatus(networkstatus_t *ns,
node_t *node = node_get_mutable_by_id(ri->cache_info.identity_digest);
tt_assert(node);
node->rs = rs;
- memcpy(node->hsdir_index->current, curr_hsdir_index,
- sizeof(node->hsdir_index->current));
+ memcpy(node->hsdir_index->fetch, curr_hsdir_index,
+ sizeof(node->hsdir_index->fetch));
smartlist_add(ns->routerstatus_list, rs);
done: