Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion crates/op-rbuilder/src/builders/flashblocks/payload.rs
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,12 @@ where
schedule = ?flashblock_scheduler,
"Computed flashblock timing schedule"
);
let target_flashblocks = flashblock_scheduler.target_flashblocks();

// Get target number of flashblocks to build. If no flashblocks are scheduled, return early.
let Some(target_flashblocks) = flashblock_scheduler.target_flashblocks() else {
self.record_flashblocks_metrics(&ctx, &info, 0, &span);
return Ok(());
};

let expected_flashblocks = self.config.flashblocks_per_block();
if target_flashblocks < expected_flashblocks {
Expand Down Expand Up @@ -557,6 +562,11 @@ where
};
let _entered = fb_span.enter();

if ctx.flashblock_index() > ctx.target_flashblock_count() {
self.record_flashblocks_metrics(&ctx, &info, target_flashblocks, &span);
return Ok(());
}

// Build flashblock after receiving signal
let next_flashblocks_ctx = match self.build_next_flashblock(
&ctx,
Expand Down
Loading