Skip to content

Commit f8a42f4

Browse files
committed
fix comments
1 parent 3e772db commit f8a42f4

File tree

1 file changed

+7
-5
lines changed
  • crates/chain-orchestrator/src

1 file changed

+7
-5
lines changed

crates/chain-orchestrator/src/lib.rs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -292,13 +292,17 @@ impl<
292292
}
293293
}
294294
SequencerEvent::PayloadReady(payload_id) => {
295-
if let Some(block) = self
295+
let block = self
296296
.sequencer
297297
.as_mut()
298298
.expect("sequencer must be present")
299299
.finalize_payload_building(payload_id, &mut self.engine)
300-
.await?
301-
{
300+
.await?;
301+
302+
self.metric_handler.finish_all_block_building_recording();
303+
self.metric_handler.finish_block_building_interval_recording();
304+
305+
if let Some(block) = block {
302306
let block_info: L2BlockInfoWithL1Messages = (&block).into();
303307
self.database
304308
.update_l1_messages_from_l2_blocks(vec![block_info.clone()])
@@ -310,8 +314,6 @@ impl<
310314
self.metric_handler.finish_no_empty_block_building_recording();
311315
return Ok(Some(ChainOrchestratorEvent::BlockSequenced(block)));
312316
}
313-
self.metric_handler.finish_all_block_building_recording();
314-
self.metric_handler.finish_block_building_interval_recording();
315317
}
316318
}
317319

0 commit comments

Comments
 (0)