diff --git a/changelog/Forostovec_fix-execution-option.md b/changelog/Forostovec_fix-execution-option.md new file mode 100644 index 0000000000..e5f594f31a --- /dev/null +++ b/changelog/Forostovec_fix-execution-option.md @@ -0,0 +1,3 @@ +## Changed + +- Avoid redundant WithHttpEndpoint when JWT is provided diff --git a/cmd/beacon-chain/execution/options.go b/cmd/beacon-chain/execution/options.go index 3b505bfdba..96c48bc22c 100644 --- a/cmd/beacon-chain/execution/options.go +++ b/cmd/beacon-chain/execution/options.go @@ -24,12 +24,13 @@ func FlagOptions(c *cli.Context) ([]execution.Option, error) { } headers := strings.Split(c.String(flags.ExecutionEngineHeaders.Name), ",") opts := []execution.Option{ - execution.WithHttpEndpoint(endpoint), execution.WithEth1HeaderRequestLimit(c.Uint64(flags.Eth1HeaderReqLimit.Name)), execution.WithHeaders(headers), } if len(jwtSecret) > 0 { opts = append(opts, execution.WithHttpEndpointAndJWTSecret(endpoint, jwtSecret)) + } else { + opts = append(opts, execution.WithHttpEndpoint(endpoint)) } return opts, nil }