We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 41d802a commit 3c87d61Copy full SHA for 3c87d61
modules/stake_delta_filter/src/stake_delta_filter.rs
@@ -105,14 +105,16 @@ impl StakeDeltaFilterParams {
105
};
106
107
info!("Cache mode {:?}", params.cache_mode);
108
- if params.cache_mode != CacheMode::Predefined {
+ if params.cache_mode == CacheMode::Read {
109
if !Path::new(¶ms.cache_dir).try_exists()? {
110
return Err(anyhow!(
111
"Pointer cache directory '{}' does not exist.",
112
params.cache_dir
113
));
114
}
115
info!("Reading (writing) caches from (to) {}", params.cache_dir);
116
+ } else if params.cache_mode != CacheMode::Predefined {
117
+ std::fs::create_dir_all(¶ms.cache_dir)?;
118
119
120
Ok(Arc::new(params))
0 commit comments