diff options
author | David Goulet <dgoulet@torproject.org> | 2017-09-12 11:02:40 -0400 |
---|---|---|
committer | David Goulet <dgoulet@torproject.org> | 2017-09-12 11:03:13 -0400 |
commit | 98953b1fc29a693aa797989402f7205523448408 (patch) | |
tree | 0c3e832034461a7b8cf18e7db9569ab4020bf45a /src/or/nodelist.c | |
parent | 184bd2258673f9e33e43cfc1264da78f74ad78a4 (diff) | |
download | tor-98953b1fc29a693aa797989402f7205523448408.tar.gz tor-98953b1fc29a693aa797989402f7205523448408.zip |
hs-v3: Rate limit some log statements
Also fix an indentation issue.
Closes #23480
Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/or/nodelist.c')
-rw-r--r-- | src/or/nodelist.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/or/nodelist.c b/src/or/nodelist.c index 01a0e9e856..df735a9d24 100644 --- a/src/or/nodelist.c +++ b/src/or/nodelist.c @@ -300,14 +300,16 @@ node_set_hsdir_index(node_t *node, const networkstatus_t *ns) tor_assert(ns); if (!networkstatus_is_live(ns, now)) { - log_info(LD_GENERAL, "Not setting hsdir index with a non-live consensus."); + static struct ratelim_t live_consensus_ratelim = RATELIM_INIT(30 * 60); + log_fn_ratelim(&live_consensus_ratelim, LOG_INFO, LD_GENERAL, + "Not setting hsdir index with a non-live consensus."); goto done; } node_identity_pk = node_get_ed25519_id(node); if (node_identity_pk == NULL) { log_debug(LD_GENERAL, "ed25519 identity public key not found when " - "trying to build the hsdir indexes for node %s", + "trying to build the hsdir indexes for node %s", node_describe(node)); goto done; } |