commit c2757c3774c4f191bdca5684eec4833a228c00c2 Author: Nick Mathewson nickm@torproject.org Date: Thu Feb 1 08:44:47 2018 -0500
Remove nodelist_recompute_all_hsdir_indices() as unused.
Closes 25108. --- changes/ticket25108 | 3 +++ src/or/nodelist.c | 21 --------------------- src/or/nodelist.h | 2 -- 3 files changed, 3 insertions(+), 23 deletions(-)
diff --git a/changes/ticket25108 b/changes/ticket25108 new file mode 100644 index 000000000..6aefac16d --- /dev/null +++ b/changes/ticket25108 @@ -0,0 +1,3 @@ + o Code simplification and refactoring: + - Remove the unused nodelist_recompute_all_hsdir_indices(). Closes ticket + 25108. diff --git a/src/or/nodelist.c b/src/or/nodelist.c index c2bc0d1f7..17a50ca86 100644 --- a/src/or/nodelist.c +++ b/src/or/nodelist.c @@ -373,27 +373,6 @@ node_set_hsdir_index(node_t *node, const networkstatus_t *ns) return; }
-/** Recompute all node hsdir indices. */ -void -nodelist_recompute_all_hsdir_indices(void) -{ - networkstatus_t *consensus; - if (!the_nodelist) { - return; - } - - /* Get a live consensus. Abort if not found */ - consensus = networkstatus_get_live_consensus(approx_time()); - if (!consensus) { - return; - } - - /* Recompute all hsdir indices */ - SMARTLIST_FOREACH_BEGIN(the_nodelist->nodes, node_t *, node) { - node_set_hsdir_index(node, consensus); - } SMARTLIST_FOREACH_END(node); -} - /** Called when a node's address changes. */ static void node_addrs_changed(node_t *node) diff --git a/src/or/nodelist.h b/src/or/nodelist.h index e879b4e8f..0abdcd604 100644 --- a/src/or/nodelist.h +++ b/src/or/nodelist.h @@ -35,8 +35,6 @@ void nodelist_remove_routerinfo(routerinfo_t *ri); void nodelist_purge(void); smartlist_t *nodelist_find_nodes_with_microdesc(const microdesc_t *md);
-void nodelist_recompute_all_hsdir_indices(void); - void nodelist_free_all(void); void nodelist_assert_ok(void);
tor-commits@lists.torproject.org