From 2255c8b2875534cfff997fb80623e5710f8af8a2 Mon Sep 17 00:00:00 2001 From: james-prysm <90280386+james-prysm@users.noreply.github.com> Date: Wed, 20 Mar 2024 12:59:15 -0500 Subject: [PATCH] setting missing beacon API (#13778) --- validator/node/node.go | 2 ++ validator/rpc/server.go | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/validator/node/node.go b/validator/node/node.go index f8bb0c56a..67d92e32b 100644 --- a/validator/node/node.go +++ b/validator/node/node.go @@ -660,6 +660,8 @@ func (c *ValidatorClient) registerRPCService(router *mux.Router) error { ClientGrpcRetryDelay: grpcRetryDelay, ClientGrpcHeaders: strings.Split(grpcHeaders, ","), ClientWithCert: clientCert, + BeaconApiTimeout: time.Second * 30, + BeaconApiEndpoint: c.cliCtx.String(flags.BeaconRESTApiProviderFlag.Name), Router: router, }) return c.services.RegisterService(server) diff --git a/validator/rpc/server.go b/validator/rpc/server.go index 13dc6332e..10cdc6de6 100644 --- a/validator/rpc/server.go +++ b/validator/rpc/server.go @@ -53,6 +53,8 @@ type Config struct { GenesisFetcher client.GenesisFetcher WalletInitializedFeed *event.Feed NodeGatewayEndpoint string + BeaconApiEndpoint string + BeaconApiTimeout time.Duration Router *mux.Router Wallet *wallet.Wallet } @@ -130,6 +132,8 @@ func NewServer(ctx context.Context, cfg *Config) *Server { validatorMonitoringPort: cfg.ValidatorMonitoringPort, validatorGatewayHost: cfg.ValidatorGatewayHost, validatorGatewayPort: cfg.ValidatorGatewayPort, + beaconApiTimeout: cfg.BeaconApiTimeout, + beaconApiEndpoint: cfg.BeaconApiEndpoint, router: cfg.Router, } // immediately register routes to override any catchalls