Skip to content

Commit a35cea2

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

File tree

1 file changed

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

1 file changed

+2
-2
lines changed

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -209,13 +209,13 @@ pub async fn download_and_pipeline_blocks(
209209

210210
// Early "continue"
211211
if inbox.is_empty() {
212+
blocks_processed += ooo_compacted_blocks.len() as u64;
212213
if let Some(ref blocks_tx) = blocks_post_processor_commands_tx {
213214
let _ = blocks_tx.send(PostProcessorCommand::ProcessBlocks(
214215
ooo_compacted_blocks,
215216
vec![],
216217
));
217218
}
218-
blocks_processed += 1;
219219
continue;
220220
}
221221

@@ -229,13 +229,13 @@ pub async fn download_and_pipeline_blocks(
229229
}
230230

231231
if !blocks.is_empty() {
232+
blocks_processed += blocks.len() as u64;
232233
if let Some(ref blocks_tx) = blocks_post_processor_commands_tx {
233234
let _ = blocks_tx.send(PostProcessorCommand::ProcessBlocks(
234235
compacted_blocks,
235236
blocks,
236237
));
237238
}
238-
blocks_processed += 1;
239239
}
240240
}
241241
()

0 commit comments

Comments
 (0)