Skip to content

Commit

Permalink
Merge branch 'express-lane-timeboost' into add-timeboosted-broadcastf…
Browse files Browse the repository at this point in the history
…eedmessage
  • Loading branch information
Tristan-Wilson committed Oct 15, 2024
2 parents d3cd8f5 + 651277d commit a19acb6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
2 changes: 2 additions & 0 deletions cmd/nitro/nitro.go
Original file line number Diff line number Diff line change
Expand Up @@ -678,6 +678,8 @@ func mainImpl() int {

execNodeConfig := execNode.ConfigFetcher()
if execNodeConfig.Sequencer.Enable && execNodeConfig.Sequencer.Timeboost.Enable {
log.Warn("TODO FIX RACE CONDITION sleeping for 10 seconds before starting express lane...")
time.Sleep(10 * time.Second)
execNode.Sequencer.StartExpressLane(
ctx,
common.HexToAddress(execNodeConfig.Sequencer.Timeboost.AuctionContractAddress),
Expand Down
4 changes: 0 additions & 4 deletions execution/gethexec/express_lane_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,10 +187,6 @@ func (es *expressLaneService) Start(ctxIn context.Context) {
})
}

func (es *expressLaneService) StopAndWait() {
es.StopWaiter.StopAndWait()
}

func (es *expressLaneService) currentRoundHasController() bool {
es.Lock()
defer es.Unlock()
Expand Down
5 changes: 3 additions & 2 deletions execution/gethexec/sequencer.go
Original file line number Diff line number Diff line change
Expand Up @@ -1253,6 +1253,7 @@ func (s *Sequencer) StartExpressLane(ctx context.Context, auctionContractAddr co
log.Crit("Failed to connect to sequencer RPC client", "err", err)
}
seqClient := ethclient.NewClient(rpcClient)

els, err := newExpressLaneService(
auctionContractAddr,
seqClient,
Expand All @@ -1268,8 +1269,8 @@ func (s *Sequencer) StartExpressLane(ctx context.Context, auctionContractAddr co

func (s *Sequencer) StopAndWait() {
s.StopWaiter.StopAndWait()
if s.config().Timeboost.Enable {
s.expressLaneService.StopWaiter.StopAndWait()
if s.config().Timeboost.Enable && s.expressLaneService != nil {
s.expressLaneService.StopAndWait()
}
if s.txRetryQueue.Len() == 0 && len(s.txQueue) == 0 && s.nonceFailures.Len() == 0 {
return
Expand Down

0 comments on commit a19acb6

Please sign in to comment.