summaryrefslogtreecommitdiff
path: root/src/or/rephist.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/or/rephist.c')
-rw-r--r--src/or/rephist.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/or/rephist.c b/src/or/rephist.c
index 0790084597..8caad25ce4 100644
--- a/src/or/rephist.c
+++ b/src/or/rephist.c
@@ -912,6 +912,15 @@ rep_hist_get_predicted_internal(time_t now, int *need_uptime,
return 1;
}
+/** Any ports used lately? These are pre-seeded if we just started
+ * up or if we're running a hidden service. */
+int
+any_predicted_circuits(time_t now)
+{
+ return smartlist_len(predicted_ports_list) ||
+ predicted_internal_time + PREDICTED_CIRCS_RELEVANCE_TIME >= now;
+}
+
/** Free all storage held by the OR/link history caches, by the
* bandwidth history arrays, or by the port history. */
void