diff options
author | David Goulet <dgoulet@torproject.org> | 2020-11-17 10:36:05 -0500 |
---|---|---|
committer | David Goulet <dgoulet@torproject.org> | 2020-11-17 10:36:05 -0500 |
commit | 7c06707750f549fc22b74bdba7b9743d7b536e19 (patch) | |
tree | 0bc38810315dc407dc3ffb67eae0abf5b978080d /src/feature/hs/hs_cache.c | |
parent | 6c610117819a99eb33403be08ed7a11567ca65f9 (diff) | |
parent | 0812ecd517af406aa82e5a5deddbbe799e9d8b49 (diff) | |
download | tor-7c06707750f549fc22b74bdba7b9743d7b536e19.tar.gz tor-7c06707750f549fc22b74bdba7b9743d7b536e19.zip |
Merge branch 'tor-gitlab/mr/182' into master
Diffstat (limited to 'src/feature/hs/hs_cache.c')
-rw-r--r-- | src/feature/hs/hs_cache.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/feature/hs/hs_cache.c b/src/feature/hs/hs_cache.c index 03e004c356..0febcfb40e 100644 --- a/src/feature/hs/hs_cache.c +++ b/src/feature/hs/hs_cache.c @@ -19,6 +19,7 @@ #include "feature/hs/hs_descriptor.h" #include "feature/nodelist/networkstatus.h" #include "feature/rend/rendcache.h" +#include "feature/stats/rephist.h" #include "feature/hs/hs_cache.h" @@ -174,7 +175,10 @@ cache_store_v3_as_dir(hs_cache_dir_descriptor_t *desc) * old HS protocol cache subsystem for which we are tied with. */ rend_cache_increment_allocation(cache_get_dir_entry_size(desc)); - /* XXX: Update HS statistics. We should have specific stats for v3. */ + /* Update HSv3 statistics */ + if (get_options()->HiddenServiceStatistics) { + rep_hist_hsdir_stored_maybe_new_v3_onion(desc->key); + } return 0; |