mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-06 22:23:56 -05:00
This change ensures FlagOptions in cmd/beacon-chain/execution/options.go appends only one endpoint option depending on whether a JWT secret is present. Previously the code always appended WithHttpEndpoint and then conditionally appended WithHttpEndpointAndJWTSecret which overwrote the first option, adding unnecessary allocations and cognitive overhead. Since WithHttpEndpointAndJWTSecret fully configures the endpoint, including URL and Bearer auth needed by the Engine API, the initial WithHttpEndpoint is redundant when a JWT is supplied. The refactor preserves behavior while simplifying option composition and avoiding redundant state churn. --------- Co-authored-by: james-prysm <90280386+james-prysm@users.noreply.github.com>
68 B
68 B
Changed
- Avoid redundant WithHttpEndpoint when JWT is provided