Skip to content

Commit

Permalink
Start rpc stack after creating bid validator
Browse files Browse the repository at this point in the history
RPC methods can't be registered after the stack is started.
  • Loading branch information
Tristan-Wilson committed Oct 11, 2024
1 parent fa457b1 commit 0ff4f7d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions cmd/autonomous-auctioneer/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,11 +138,6 @@ func mainImpl() int {
flag.Usage()
log.Crit("failed to initialize geth stack", "err", err)
}
err = stack.Start()
if err != nil {
fatalErrChan <- fmt.Errorf("error starting stack: %w", err)
}
defer stack.Close()
bidValidator, err := timeboost.NewBidValidator(
ctx,
stack,
Expand All @@ -156,6 +151,11 @@ func mainImpl() int {
log.Error("error initializing bid validator", "err", err)
return 1
}
err = stack.Start()
if err != nil {
fatalErrChan <- fmt.Errorf("error starting stack: %w", err)
}
defer stack.Close()
bidValidator.Start(ctx)
}

Expand Down

0 comments on commit 0ff4f7d

Please sign in to comment.