Skip to content

Commit a6651b8

Browse files
author
Ludo Galabru
committed
fix: edge case when requests processed out of order
1 parent 7487589 commit a6651b8

File tree

1 file changed

+2
-1
lines changed
  • components/ordhook-core/src/core/pipeline

1 file changed

+2
-1
lines changed

components/ordhook-core/src/core/pipeline/mod.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,6 @@ pub async fn download_and_pipeline_blocks(
169169
while let Ok(message) = block_compressed_rx.try_recv() {
170170
match message {
171171
Some((block_height, block, compacted_block)) => {
172-
blocks_processed += 1;
173172
new_blocks.push((block_height, block, compacted_block));
174173
// Max batch size: 10_000 blocks
175174
if new_blocks.len() >= 10_000 {
@@ -216,6 +215,7 @@ pub async fn download_and_pipeline_blocks(
216215
vec![],
217216
));
218217
}
218+
blocks_processed += 1;
219219
continue;
220220
}
221221

@@ -235,6 +235,7 @@ pub async fn download_and_pipeline_blocks(
235235
blocks,
236236
));
237237
}
238+
blocks_processed += 1;
238239
}
239240
}
240241
()

0 commit comments

Comments
 (0)