Skip to content

Commit

Permalink
Synced with main
Browse files Browse the repository at this point in the history
  • Loading branch information
begmaroman committed Aug 21, 2024
1 parent 4ebf12b commit 92e5681
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions cmd/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -408,11 +408,10 @@ func newState(c *config.Config, l2ChainID uint64, sqlDB *pgxpool.Pool) *state.St
}

func newReorgDetector(
ctx context.Context,
dbPath string,
client *ethclient.Client,
) *reorgdetector.ReorgDetector {
rd, err := reorgdetector.New(ctx, client, dbPath)
rd, err := reorgdetector.New(client, dbPath)
if err != nil {
log.Fatal(err)
}
Expand Down Expand Up @@ -489,7 +488,7 @@ func runReorgDetectorL1IfNeeded(ctx context.Context, components []string, l1Clie
if !isNeeded([]string{SEQUENCE_SENDER, AGGREGATOR, AGGORACLE, RPC}, components) {
return nil
}
rd := newReorgDetector(ctx, dbPath, l1Client)
rd := newReorgDetector(dbPath, l1Client)
go rd.Start(ctx)
return rd
}
Expand All @@ -498,7 +497,7 @@ func runReorgDetectorL2IfNeeded(ctx context.Context, components []string, l2Clie
if !isNeeded([]string{AGGORACLE, RPC}, components) {
return nil
}
rd := newReorgDetector(ctx, dbPath, l2Client)
rd := newReorgDetector(dbPath, l2Client)
go rd.Start(ctx)
return rd
}
Expand Down

0 comments on commit 92e5681

Please sign in to comment.