refactor: use central flag name for validator HTTP server port (#15236)

* Update validator.go

* Create tomasandroil_replace_grpc_gateway_flag_name.md
This commit is contained in:
Tomás Andróil
2025-08-09 12:35:04 +02:00
committed by GitHub
parent 87235fb384
commit 921ff23c6b
2 changed files with 4 additions and 2 deletions

View File

@@ -221,13 +221,13 @@ func (v *ValidatorNode) Start(ctx context.Context) error {
if err != nil {
return err
}
portFlagName := "grpc-gateway-port" // TODO: replace port flag name with flags.HTTPServerPort.Name in a future release
args := []string{
fmt.Sprintf("--%s=%s/eth2-val-%d", cmdshared.DataDirFlag.Name, e2e.TestParams.TestPath, index),
fmt.Sprintf("--%s=%s", cmdshared.LogFileName.Name, logFile.Name()),
fmt.Sprintf("--%s=%s", flags.GraffitiFileFlag.Name, gFile),
fmt.Sprintf("--%s=%d", flags.MonitoringPortFlag.Name, e2e.TestParams.Ports.ValidatorMetricsPort+index),
fmt.Sprintf("--%s=%d", portFlagName, e2e.TestParams.Ports.ValidatorHTTPPort+index),
fmt.Sprintf("--%s=%d", flags.HTTPServerPort.Name, e2e.TestParams.Ports.ValidatorHTTPPort+index),
fmt.Sprintf("--%s=localhost:%d", flags.BeaconRPCProviderFlag.Name, beaconRPCPort),
fmt.Sprintf("--%s=%s", flags.GRPCHeadersFlag.Name, "dummy=value,foo=bar"), // Sending random headers shouldn't break anything.