mirror of
https://github.com/alexgo-io/bitcoin-indexer.git
synced 2026-01-12 22:43:06 +08:00
fix: build error
This commit is contained in:
@@ -19,13 +19,11 @@ use chainhook_sdk::indexer::bitcoin::{
|
||||
use super::protocol::inscription_parsing::parse_inscriptions_and_standardize_block;
|
||||
|
||||
pub enum PostProcessorCommand {
|
||||
Start,
|
||||
ProcessBlocks(Vec<(u64, LazyBlock)>, Vec<BitcoinBlockData>),
|
||||
Terminate,
|
||||
}
|
||||
|
||||
pub enum PostProcessorEvent {
|
||||
Started,
|
||||
Terminated,
|
||||
Expired,
|
||||
}
|
||||
@@ -150,7 +148,6 @@ pub async fn download_and_pipeline_blocks(
|
||||
let mut inbox = HashMap::new();
|
||||
let mut inbox_cursor = start_sequencing_blocks_at_height.max(start_block);
|
||||
let mut blocks_processed = 0;
|
||||
let mut processor_started = false;
|
||||
let mut stop_runloop = false;
|
||||
|
||||
loop {
|
||||
@@ -194,13 +191,6 @@ pub async fn download_and_pipeline_blocks(
|
||||
continue;
|
||||
}
|
||||
|
||||
if let Some(ref blocks_tx) = blocks_post_processor_commands_tx {
|
||||
if !processor_started {
|
||||
processor_started = true;
|
||||
let _ = blocks_tx.send(PostProcessorCommand::Start);
|
||||
}
|
||||
}
|
||||
|
||||
let mut ooo_compacted_blocks = vec![];
|
||||
for (block_height, block_opt, compacted_block) in new_blocks.into_iter() {
|
||||
if let Some(block) = block_opt {
|
||||
@@ -296,7 +286,6 @@ pub async fn download_and_pipeline_blocks(
|
||||
if let Ok(signal) = post_processor.events_rx.recv() {
|
||||
match signal {
|
||||
PostProcessorEvent::Terminated | PostProcessorEvent::Expired => break,
|
||||
PostProcessorEvent::Started => unreachable!(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -134,14 +134,19 @@ pub fn parallelize_inscription_data_computations(
|
||||
}
|
||||
}
|
||||
|
||||
let next_block_heights = next_blocks
|
||||
.iter()
|
||||
.map(|b| format!("{}", b.block_identifier.index))
|
||||
.collect::<Vec<_>>();
|
||||
|
||||
ctx.try_log(|logger| {
|
||||
info!(
|
||||
logger,
|
||||
"Number of inscriptions in block #{} to process: {} (L1 cache hits: {}, queue len: {}, L1 cache len: {}, L2 cache len: {})",
|
||||
"Number of inscriptions in block #{} to process: {} (L1 cache hits: {}, queue: [{}], L1 cache len: {}, L2 cache len: {})",
|
||||
block.block_identifier.index,
|
||||
transactions_ids.len(),
|
||||
l1_cache_hits.len(),
|
||||
next_blocks.len(),
|
||||
next_block_heights.join(", "),
|
||||
cache_l1.len(),
|
||||
cache_l2.len(),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user