fix: build error

This commit is contained in:
Ludo Galabru
2023-08-25 07:04:14 -04:00
parent a04711ad7c
commit bbede8b546
2 changed files with 7 additions and 13 deletions

View File

@@ -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!(),
}
}
}

View File

@@ -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(),
)