Skip to content

Commit

Permalink
Move timeboost init back to mainImpl
Browse files Browse the repository at this point in the history
It doesn't work where it was before, the contractAdapter is unable to
read the express lane contract.
  • Loading branch information
Tristan-Wilson committed Jan 21, 2025
1 parent 071aa54 commit 8d907b2
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 12 deletions.
14 changes: 14 additions & 0 deletions cmd/nitro/nitro.go
Original file line number Diff line number Diff line change
Expand Up @@ -689,6 +689,20 @@ func mainImpl() int {
}
}

execNodeConfig := execNode.ConfigFetcher()
if execNodeConfig.Sequencer.Enable && execNodeConfig.Sequencer.Timeboost.Enable {
err := execNode.Sequencer.InitializeExpressLaneService(
execNode.Backend.APIBackend(),
execNode.FilterSystem,
common.HexToAddress(execNodeConfig.Sequencer.Timeboost.AuctionContractAddress),
common.HexToAddress(execNodeConfig.Sequencer.Timeboost.AuctioneerAddress),
execNodeConfig.Sequencer.Timeboost.EarlySubmissionGrace,
)
if err != nil {
log.Error("failed to create express lane service", "err", err)
}
}

err = nil
select {
case err = <-fatalErrChan:
Expand Down
12 changes: 0 additions & 12 deletions execution/gethexec/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -358,18 +358,6 @@ func (n *ExecutionNode) Initialize(ctx context.Context) error {
if err != nil {
return fmt.Errorf("error setting sync backend: %w", err)
}
if config.Sequencer.Enable && config.Sequencer.Timeboost.Enable {
err := n.Sequencer.InitializeExpressLaneService(
n.Backend.APIBackend(),
n.FilterSystem,
common.HexToAddress(config.Sequencer.Timeboost.AuctionContractAddress),
common.HexToAddress(config.Sequencer.Timeboost.AuctioneerAddress),
config.Sequencer.Timeboost.EarlySubmissionGrace,
)
if err != nil {
return fmt.Errorf("failed to create express lane service. err: %w", err)
}
}

return nil
}
Expand Down

0 comments on commit 8d907b2

Please sign in to comment.