summaryrefslogtreecommitdiff
path: root/src/feature/hs/hs_client.c
diff options
context:
space:
mode:
authorDavid Goulet <dgoulet@torproject.org>2021-01-12 10:54:31 -0500
committerDavid Goulet <dgoulet@torproject.org>2021-01-12 10:54:31 -0500
commitb3652f2104c880bf626cb4e97e6088bca5a1571f (patch)
tree6cb537a2bc8f367f626f3dd728eb626d4041617d /src/feature/hs/hs_client.c
parent5a822b462aaa8cf3cd749c253bb1e9e5f4f37fa2 (diff)
parent0485c7ddba8c3474d1be8972caa9505b09d65644 (diff)
downloadtor-b3652f2104c880bf626cb4e97e6088bca5a1571f.tar.gz
tor-b3652f2104c880bf626cb4e97e6088bca5a1571f.zip
Merge branch 'ticket40237_043_01' into ticket40237_044_01
Diffstat (limited to 'src/feature/hs/hs_client.c')
-rw-r--r--src/feature/hs/hs_client.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/feature/hs/hs_client.c b/src/feature/hs/hs_client.c
index fc1fd76efc..0f6109195b 100644
--- a/src/feature/hs/hs_client.c
+++ b/src/feature/hs/hs_client.c
@@ -29,6 +29,7 @@
#include "feature/hs/hs_descriptor.h"
#include "feature/hs/hs_ident.h"
#include "feature/nodelist/describe.h"
+#include "feature/nodelist/microdesc.h"
#include "feature/nodelist/networkstatus.h"
#include "feature/nodelist/nodelist.h"
#include "feature/nodelist/routerset.h"
@@ -1302,9 +1303,10 @@ can_client_refetch_desc(const ed25519_public_key_t *identity_pk,
goto cannot;
}
- /* Without a live consensus we can't do any client actions. It is needed to
- * compute the hashring for a service. */
- if (!networkstatus_get_live_consensus(approx_time())) {
+ /* Without a usable consensus we can't do any client actions. It is needed
+ * to compute the hashring for a service. */
+ if (!networkstatus_get_reasonably_live_consensus(approx_time(),
+ usable_consensus_flavor())) {
log_info(LD_REND, "Can't fetch descriptor for service %s because we "
"are missing a live consensus. Stalling connection.",
safe_str_client(ed25519_fmt(identity_pk)));