summaryrefslogtreecommitdiff
path: root/src/or/consdiffmgr.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/or/consdiffmgr.h')
-rw-r--r--src/or/consdiffmgr.h19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/or/consdiffmgr.h b/src/or/consdiffmgr.h
index 048dae432c..fe4f9ee239 100644
--- a/src/or/consdiffmgr.h
+++ b/src/or/consdiffmgr.h
@@ -14,7 +14,6 @@ typedef enum consdiff_status_t {
} consdiff_status_t;
typedef struct consdiff_cfg_t {
- int32_t cache_max_age_hours;
int32_t cache_max_num;
} consdiff_cfg_t;
@@ -23,6 +22,11 @@ struct consensus_cache_entry_t; // from conscache.h
int consdiffmgr_add_consensus(const char *consensus,
const networkstatus_t *as_parsed);
+consdiff_status_t consdiffmgr_find_consensus(
+ struct consensus_cache_entry_t **entry_out,
+ consensus_flavor_t flavor,
+ compress_method_t method);
+
consdiff_status_t consdiffmgr_find_diff_from(
struct consensus_cache_entry_t **entry_out,
consensus_flavor_t flavor,
@@ -30,8 +34,20 @@ consdiff_status_t consdiffmgr_find_diff_from(
const uint8_t *digest,
size_t digestlen,
compress_method_t method);
+
+int consensus_cache_entry_get_voter_id_digests(
+ const struct consensus_cache_entry_t *ent,
+ smartlist_t *out);
+int consensus_cache_entry_get_fresh_until(
+ const struct consensus_cache_entry_t *ent,
+ time_t *out);
+int consensus_cache_entry_get_valid_until(
+ const struct consensus_cache_entry_t *ent,
+ time_t *out);
+
void consdiffmgr_rescan(void);
int consdiffmgr_cleanup(void);
+void consdiffmgr_enable_background_compression(void);
void consdiffmgr_configure(const consdiff_cfg_t *cfg);
struct sandbox_cfg_elem;
int consdiffmgr_register_with_sandbox(struct sandbox_cfg_elem **cfg);
@@ -40,6 +56,7 @@ int consdiffmgr_validate(void);
#ifdef CONSDIFFMGR_PRIVATE
STATIC unsigned n_diff_compression_methods(void);
+STATIC unsigned n_consensus_compression_methods(void);
STATIC consensus_cache_t *cdm_cache_get(void);
STATIC consensus_cache_entry_t *cdm_cache_lookup_consensus(
consensus_flavor_t flavor, time_t valid_after);