summaryrefslogtreecommitdiff
path: root/src/or/dirserv.c
diff options
context:
space:
mode:
authorCaio Valente <valentecaio95@gmail.com>2018-01-31 02:36:38 +0100
committerCaio Valente <valentecaio95@gmail.com>2018-01-31 02:36:38 +0100
commita4c85312604c1d215f9f46a24ac242baf666ed56 (patch)
tree1e2bc081862d5b31b2eefdc5b4efb4fb7d20ac15 /src/or/dirserv.c
parentd2ae1bfcb314965fd1ff1353308da0e92a00c958 (diff)
downloadtor-a4c85312604c1d215f9f46a24ac242baf666ed56.tar.gz
tor-a4c85312604c1d215f9f46a24ac242baf666ed56.zip
refactor: using get_uptime() (and reset_uptime()) consistently.
Using get_uptime() and reset_uptime() instead of accessing stats_n_seconds_working directly. stats_n_seconds_working is not extern anymore. Ticket #25081
Diffstat (limited to 'src/or/dirserv.c')
-rw-r--r--src/or/dirserv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/or/dirserv.c b/src/or/dirserv.c
index d3bae241f9..5f778322b7 100644
--- a/src/or/dirserv.c
+++ b/src/or/dirserv.c
@@ -1417,7 +1417,7 @@ dirserv_thinks_router_is_hs_dir(const routerinfo_t *router,
* tests aren't instant. If we haven't been running long enough,
* trust the relay. */
- if (stats_n_seconds_working >
+ if (get_uptime() >
get_options()->MinUptimeHidServDirectoryV2 * 1.1)
uptime = MIN(rep_hist_get_uptime(router->cache_info.identity_digest, now),
real_uptime(router, now));