Skip to content

Commit 8d36bd0

Browse files
committed
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.
1 parent 47d71fd commit 8d36bd0

File tree

1 file changed

+0
-30
lines changed

1 file changed

+0
-30
lines changed

filecoin-proofs/src/api/mod.rs

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -64,36 +64,6 @@ pub fn clear_cache<Tree>(cache_dir: &Path) -> Result<()> {
6464
result
6565
}
6666

67-
// TODO vmx 2023-09-26: The `Tree` generic is not needed, it's only there in order to not breaking
68-
// the public API. Once we break the API, remove that generic.
69-
// Ensure that any associated cached data persisted is discarded.
70-
pub fn clear_caches<Tree: MerkleTreeTrait>(
71-
replicas: &BTreeMap<SectorId, PrivateReplicaInfo<Tree>>,
72-
) -> Result<()> {
73-
info!("clear_caches:start");
74-
75-
for replica in replicas.values() {
76-
clear_cache::<Tree>(replica.cache_dir.as_path())?;
77-
}
78-
79-
info!("clear_caches:finish");
80-
81-
Ok(())
82-
}
83-
84-
// TODO vmx 2023-09-26: The `Tree` generic is not needed, it's only there in order to not breaking
85-
// the public API. Once we break the API, remove that generic.
86-
// Ensure that any persisted layer data generated from porep are discarded.
87-
pub fn clear_layer_data<Tree>(cache_dir: &Path) -> Result<()> {
88-
info!("clear_layer_data:start");
89-
90-
let result = stacked::clear_cache_dir(cache_dir);
91-
92-
info!("clear_layer_data:finish");
93-
94-
result
95-
}
96-
9767
// TODO vmx 2023-09-26: The `Tree` generic is not needed, it's only there in order to not breaking
9868
// the public API. Once we break the API, remove that generic.
9969
// Ensure that any persisted vanilla proofs generated from synthetic porep are discarded.

0 commit comments

Comments
 (0)