From 0ff4f7db0706b924ba8ec0f5c61fd38043f4bddc Mon Sep 17 00:00:00 2001 From: Tristan Wilson Date: Fri, 11 Oct 2024 11:54:24 +0200 Subject: [PATCH] Start rpc stack after creating bid validator RPC methods can't be registered after the stack is started. --- cmd/autonomous-auctioneer/main.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/cmd/autonomous-auctioneer/main.go b/cmd/autonomous-auctioneer/main.go index ab5caa3908..9007a74816 100644 --- a/cmd/autonomous-auctioneer/main.go +++ b/cmd/autonomous-auctioneer/main.go @@ -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, @@ -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) }