Skip to content

Commit 0c6a0ce

Browse files
committed
Revert "feat: always update safe head (#434)"
This reverts commit 81c904c.
1 parent ff96d5f commit 0c6a0ce

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

crates/chain-orchestrator/src/consolidation.rs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,15 @@ pub(crate) async fn reconcile_batch<L2P: Provider<Scroll>>(
3636
// Extract the block info with L1 messages.
3737
let block_info: L2BlockInfoWithL1Messages = (&current_block).into();
3838

39-
// The derived attributes match the L2 chain but are associated with a block
40-
// number less than or equal to the finalized block, so skip.
41-
if attributes.block_number <= fcs.finalized_block_info().number {
39+
// The block matches the derived attributes and the block is below or equal to the
40+
// safe current safe head.
41+
if attributes.block_number <= fcs.finalized_block_info().number ||
42+
((attributes.block_number <= fcs.safe_block_info().number) &&
43+
batch.target_status.is_consolidated())
44+
{
4245
Ok::<_, ChainOrchestratorError>(BlockConsolidationAction::Skip(block_info))
4346
} else {
44-
// The block matches the derived attributes but is above the finalized block,
45-
// so we need to update the fcs.
47+
// The block matches the derived attributes, no action is needed.
4648
Ok::<_, ChainOrchestratorError>(BlockConsolidationAction::UpdateFcs(block_info))
4749
}
4850
} else {

0 commit comments

Comments
 (0)