File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed
crates/chain-orchestrator/src Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -407,12 +407,15 @@ impl<
407407
408408 // Check if the unwind impacts the fcs safe head.
409409 if let Some ( block_info) = unwind_result. l2_safe_block_info {
410- // If the safe head was unwound and is above or equal to the finalized head,
411- // update the fcs.
412- if block_info. number != self . engine . fcs ( ) . safe_block_info ( ) . number &&
413- block_info. number >= self . engine . fcs ( ) . finalized_block_info ( ) . number
414- {
410+ // If the new safe head is above the current finalized head, update the fcs safe
411+ // head to the new safe head.
412+ if block_info. number >= self . engine . fcs ( ) . finalized_block_info ( ) . number {
415413 self . engine . update_fcs ( None , Some ( block_info) , None ) . await ?;
414+ } else {
415+ // Otherwise, update the fcs safe head to the finalized head.
416+ self . engine
417+ . update_fcs ( None , Some ( * self . engine . fcs ( ) . finalized_block_info ( ) ) , None )
418+ . await ?;
416419 }
417420 }
418421
You can’t perform that action at this time.
0 commit comments