Skip to content

Commit

Permalink
use stage error
Browse files Browse the repository at this point in the history
  • Loading branch information
clabby committed Sep 17, 2024
1 parent a061543 commit 2234a5e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions crates/derive/src/stages/batch_queue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -180,9 +180,9 @@ where
// If the current epoch is too old compared to the L1 block we are at,
// i.e. if the sequence window expired, we create empty batches for the current epoch
let expiry_epoch = epoch.number + self.cfg.seq_window_size;
let bq_origin = self.origin.ok_or_else(|| anyhow!("missing origin"))?;
let force_empty_batches = (expiry_epoch == bq_origin.number && empty) ||
expiry_epoch < bq_origin.number;
let bq_origin = self.origin.ok_or(StageError::MissingOrigin)?;
let force_empty_batches =
(expiry_epoch == bq_origin.number && empty) || expiry_epoch < bq_origin.number;
let first_of_epoch = epoch.number == parent.l1_origin.number + 1;

// If the sequencer window did not expire,
Expand Down

0 comments on commit 2234a5e

Please sign in to comment.