Skip to content

Commit

Permalink
fix: tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelcr committed Nov 11, 2024
1 parent 5012aaa commit 29cda0a
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions components/chainhook-cli/src/scan/stacks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -588,13 +588,16 @@ pub async fn import_stacks_chainstate_from_remote_tsv(
config: &mut Config,
ctx: &Context,
) -> Result<(), String> {
if !config.is_cache_path_empty()? {
try_info!(ctx, "A Stacks chainstate already exists, skipping TSV chainstante import");
return Ok(());
}
if !config.contains_remote_stacks_tsv_url() {
try_info!(ctx, "No remote Stacks TSV location was specified in config file, skipping TSV chainstante import");
return Ok(());
#[cfg(not(test))]
{
if !config.is_cache_path_empty()? {
try_info!(ctx, "A Stacks chainstate already exists, skipping TSV chainstante import");
return Ok(());
}
if !config.contains_remote_stacks_tsv_url() {
try_info!(ctx, "No remote Stacks TSV location was specified in config file, skipping TSV chainstante import");
return Ok(());
}
}
try_info!(ctx, "Importing Stacks chainstate from TSV");

Expand Down

0 comments on commit 29cda0a

Please sign in to comment.