diff --git a/components/chainhook-cli/src/cli/mod.rs b/components/chainhook-cli/src/cli/mod.rs index cde96f5..d29f036 100644 --- a/components/chainhook-cli/src/cli/mod.rs +++ b/components/chainhook-cli/src/cli/mod.rs @@ -859,7 +859,7 @@ async fn handle_command(opts: Opts, ctx: Context) -> Result<(), String> { let mut missing_blocks = vec![]; for i in 1..=790000 { - if find_lazy_block_at_block_height(i, 4, &blocks_db_rw, &ctx).is_none() { + if find_lazy_block_at_block_height(i, 3, &blocks_db_rw, &ctx).is_none() { println!("Missing block {i}"); missing_blocks.push(i); } @@ -899,7 +899,7 @@ async fn handle_command(opts: Opts, ctx: Context) -> Result<(), String> { let config = Config::default(false, false, false, &cmd.config_path)?; let stacks_db = open_readonly_stacks_db_conn(&config.expected_cache_path(), &ctx) .expect("unable to read stacks_db"); - match get_stacks_block_at_block_height(cmd.block_height, true, 4, &stacks_db) { + match get_stacks_block_at_block_height(cmd.block_height, true, 3, &stacks_db) { Ok(Some(block)) => { info!(ctx.expect_logger(), "{}", json!(block)); } diff --git a/components/chainhook-cli/src/scan/bitcoin.rs b/components/chainhook-cli/src/scan/bitcoin.rs index 81ade61..3078530 100644 --- a/components/chainhook-cli/src/scan/bitcoin.rs +++ b/components/chainhook-cli/src/scan/bitcoin.rs @@ -80,7 +80,7 @@ pub async fn scan_bitcoin_chainstate_via_rpc_using_predicate( let blocks_db_rw = open_readwrite_hord_db_conn_rocks_db(&config.expected_cache_path(), ctx)?; - if find_lazy_block_at_block_height(end_block as u32, 4, &blocks_db_rw, &ctx).is_none() { + if find_lazy_block_at_block_height(end_block as u32, 3, &blocks_db_rw, &ctx).is_none() { // Count how many entries in the table // Compute the right interval // Start the build local storage routine diff --git a/components/chainhook-sdk/src/hord/db/mod.rs b/components/chainhook-sdk/src/hord/db/mod.rs index 16d8035..2c0c830 100644 --- a/components/chainhook-sdk/src/hord/db/mod.rs +++ b/components/chainhook-sdk/src/hord/db/mod.rs @@ -981,7 +981,7 @@ pub fn retrieve_satoshi_point_using_lazy_storage( tx.get_cumulated_sats_in_until_input_index(input_index), ) } - None => match find_lazy_block_at_block_height(ordinal_block_number, 4, &blocks_db, &ctx) { + None => match find_lazy_block_at_block_height(ordinal_block_number, 3, &blocks_db, &ctx) { None => { return Err(format!("block #{ordinal_block_number} not in database")); } @@ -1080,7 +1080,7 @@ pub fn retrieve_satoshi_point_using_lazy_storage( } let lazy_block = - match find_lazy_block_at_block_height(ordinal_block_number, 4, &blocks_db, &ctx) { + match find_lazy_block_at_block_height(ordinal_block_number, 3, &blocks_db, &ctx) { Some(block) => block, None => { return Err(format!("block #{ordinal_block_number} not in database"));