Skip to content

Commit 05bd903

Browse files
author
Ludo Galabru
committed
fix: cache invalidation
1 parent 1a9eddb commit 05bd903

File tree

1 file changed

+4
-8
lines changed
  • components/chainhook-cli/src/archive

1 file changed

+4
-8
lines changed

components/chainhook-cli/src/archive/mod.rs

+4-8
Original file line numberDiff line numberDiff line change
@@ -197,14 +197,10 @@ pub async fn download_stacks_dataset_if_required(config: &mut Config, ctx: &Cont
197197
};
198198
let should_download = match (local_sha_file, remote_sha_file) {
199199
(Ok(local), Ok(remote_response)) => {
200-
let cache_not_expired = remote_response.starts_with(&local[0..32]) == false;
201-
if cache_not_expired {
202-
info!(
203-
ctx.expect_logger(),
204-
"More recent Stacks archive file detected"
205-
);
206-
}
207-
cache_not_expired == false
200+
let local_version_is_latest = remote_response
201+
.to_ascii_lowercase()
202+
.starts_with(&local[0..32]);
203+
local_version_is_latest == false
208204
}
209205
(_, _) => {
210206
info!(

0 commit comments

Comments
 (0)