From 8d36bd0e1d2f392a668e87bd2e8e4f148ef49f57 Mon Sep 17 00:00:00 2001 From: Volker Mische Date: Wed, 8 Jan 2025 13:03:19 +0100 Subject: [PATCH] chore: remove clear_layer_data() and clear_caches() functions `clear_layer_data()` and `clear_caches()` arent't used within `rust-fil-proofs` or `rust-filecoin-proofs-api`, hence remove them. --- filecoin-proofs/src/api/mod.rs | 30 ------------------------------ 1 file changed, 30 deletions(-) diff --git a/filecoin-proofs/src/api/mod.rs b/filecoin-proofs/src/api/mod.rs index 7c29145a6..9c1236014 100644 --- a/filecoin-proofs/src/api/mod.rs +++ b/filecoin-proofs/src/api/mod.rs @@ -64,36 +64,6 @@ pub fn clear_cache(cache_dir: &Path) -> Result<()> { result } -// TODO vmx 2023-09-26: The `Tree` generic is not needed, it's only there in order to not breaking -// the public API. Once we break the API, remove that generic. -// Ensure that any associated cached data persisted is discarded. -pub fn clear_caches( - replicas: &BTreeMap>, -) -> Result<()> { - info!("clear_caches:start"); - - for replica in replicas.values() { - clear_cache::(replica.cache_dir.as_path())?; - } - - info!("clear_caches:finish"); - - Ok(()) -} - -// TODO vmx 2023-09-26: The `Tree` generic is not needed, it's only there in order to not breaking -// the public API. Once we break the API, remove that generic. -// Ensure that any persisted layer data generated from porep are discarded. -pub fn clear_layer_data(cache_dir: &Path) -> Result<()> { - info!("clear_layer_data:start"); - - let result = stacked::clear_cache_dir(cache_dir); - - info!("clear_layer_data:finish"); - - result -} - // TODO vmx 2023-09-26: The `Tree` generic is not needed, it's only there in order to not breaking // the public API. Once we break the API, remove that generic. // Ensure that any persisted vanilla proofs generated from synthetic porep are discarded.