diff --git a/based/crates/sequencer/src/lib.rs b/based/crates/sequencer/src/lib.rs index edf0c3d24..853c40bd5 100644 --- a/based/crates/sequencer/src/lib.rs +++ b/based/crates/sequencer/src/lib.rs @@ -302,7 +302,7 @@ where warn!( "received FCU when Sorting. Sending already Fragged txs back to the pools and syncing to the new head." ); - for tx in frag_seq.txs.into_iter() { + for tx in frag_seq.txs.into_iter().skip(if frag_seq.next_seq == 0 { data.n_force_include } else { 0 }) { ctx.handle_tx(tx.tx, senders); } let start = ctx.db.head_block_number().expect("couldn't get db head block number"); diff --git a/based/crates/sequencer/src/sorting/sorting_data.rs b/based/crates/sequencer/src/sorting/sorting_data.rs index 5dbaf8522..309ce81a8 100644 --- a/based/crates/sequencer/src/sorting/sorting_data.rs +++ b/based/crates/sequencer/src/sorting/sorting_data.rs @@ -79,6 +79,7 @@ pub struct SortingData { pub gas_remaining: u64, pub payment: U256, pub txs: Vec, + pub n_force_include: usize, /// Sort frag until, and then commit pub until: Instant, /// We wait until these are back before we apply the next @@ -123,6 +124,7 @@ impl SortingData { tof_snapshot, gas_remaining: seq.gas_remaining, txs: vec![], + n_force_include: 0, start_t: Instant::now(), telemetry: Default::default(), } @@ -321,8 +323,10 @@ impl + Display>> SortingD .map_err(|_| OpBlockExecutionError::ForceCreate2DeployerFail)?; let Some(forced_inclusion_txs) = context.payload_attributes.transactions.as_ref() else { + self.n_force_include = 0; return Ok(()); }; + self.n_force_include = forced_inclusion_txs.len(); // Apply must include txs. for tx in forced_inclusion_txs.iter() {