Commit a7b85e6e authored by Joshua Gutow's avatar Joshua Gutow Committed by GitHub

op-node: Start EL sync even when the genesis is finalized (#10457)

parent f2e06c31
...@@ -327,8 +327,8 @@ func (e *EngineController) InsertUnsafePayload(ctx context.Context, envelope *et ...@@ -327,8 +327,8 @@ func (e *EngineController) InsertUnsafePayload(ctx context.Context, envelope *et
// Check if there is a finalized head once when doing EL sync. If so, transition to CL sync // Check if there is a finalized head once when doing EL sync. If so, transition to CL sync
if e.syncStatus == syncStatusWillStartEL { if e.syncStatus == syncStatusWillStartEL {
b, err := e.engine.L2BlockRefByLabel(ctx, eth.Finalized) b, err := e.engine.L2BlockRefByLabel(ctx, eth.Finalized)
isTransitionBlock := e.rollupCfg.Genesis.L2.Number != 0 && b.Hash == e.rollupCfg.Genesis.L2.Hash rollupGenesisIsFinalized := b.Hash == e.rollupCfg.Genesis.L2.Hash
if errors.Is(err, ethereum.NotFound) || isTransitionBlock { if errors.Is(err, ethereum.NotFound) || rollupGenesisIsFinalized {
e.syncStatus = syncStatusStartedEL e.syncStatus = syncStatusStartedEL
e.log.Info("Starting EL sync") e.log.Info("Starting EL sync")
e.elStart = e.clock.Now() e.elStart = e.clock.Now()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment