Skip to content
This repository was archived by the owner on Jan 24, 2024. It is now read-only.

Commit 3415946

Browse files
committed
ref impl: undo extra refL1 return param
1 parent 77c0b07 commit 3415946

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

opnode/l2/driver.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ func (e *EngineDriver) Drive(ctx context.Context, dl Downloader, l1Heads <-chan
177177
continue
178178
}
179179
e.Log.Debug("finding next sync step, engine syncing", "l2", e.l2Head, "l1", e.l1Head)
180-
_, nextRefL1, refL2, err := FindSyncStart(ctx, e.SyncRef, &e.Genesis)
180+
nextRefL1, refL2, err := FindSyncStart(ctx, e.SyncRef, &e.Genesis)
181181
if err != nil {
182182
e.Log.Error("Failed to find sync starting point", "err", err)
183183
continue

opnode/l2/sync_start.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ var WrongChainErr = errors.New("wrong chain")
1515

1616
// FindSyncStart finds nextRefL1: the L1 block needed next for sync, to derive into a L2 block on top of refL2.
1717
// If the L1 reorgs then this will find the common history to build on top of and then follow the first step of the reorg.
18-
func FindSyncStart(ctx context.Context, reference SyncReference, genesis *Genesis) (refL1, nextRefL1, refL2 eth.BlockID, err error) {
18+
func FindSyncStart(ctx context.Context, reference SyncReference, genesis *Genesis) (nextRefL1, refL2 eth.BlockID, err error) {
19+
var refL1 eth.BlockID // the L1 block the refL2 was derived from
1920
var parentL2 common.Hash // the parent of refL2
2021
// Start at L2 head
2122
refL1, refL2, parentL2, err = reference.RefByL2Num(ctx, nil, genesis)

0 commit comments

Comments
 (0)