mirror of
https://github.com/alexgo-io/bitcoin-indexer.git
synced 2026-01-12 16:52:57 +08:00
fix: edge case when requests processed out of order
This commit is contained in:
@@ -209,13 +209,13 @@ pub async fn download_and_pipeline_blocks(
|
||||
|
||||
// Early "continue"
|
||||
if inbox.is_empty() {
|
||||
blocks_processed += ooo_compacted_blocks.len() as u64;
|
||||
if let Some(ref blocks_tx) = blocks_post_processor_commands_tx {
|
||||
let _ = blocks_tx.send(PostProcessorCommand::ProcessBlocks(
|
||||
ooo_compacted_blocks,
|
||||
vec![],
|
||||
));
|
||||
}
|
||||
blocks_processed += 1;
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -229,13 +229,13 @@ pub async fn download_and_pipeline_blocks(
|
||||
}
|
||||
|
||||
if !blocks.is_empty() {
|
||||
blocks_processed += blocks.len() as u64;
|
||||
if let Some(ref blocks_tx) = blocks_post_processor_commands_tx {
|
||||
let _ = blocks_tx.send(PostProcessorCommand::ProcessBlocks(
|
||||
compacted_blocks,
|
||||
blocks,
|
||||
));
|
||||
}
|
||||
blocks_processed += 1;
|
||||
}
|
||||
}
|
||||
()
|
||||
|
||||
Reference in New Issue
Block a user