Clarify use of --connection.

This commit is contained in:
Jim McDonald
2021-11-02 11:05:43 +00:00
parent a00d09e28f
commit f5c4551c0c
3 changed files with 7 additions and 1 deletions

View File

@@ -32,6 +32,9 @@ func ConnectToBeaconNode(ctx context.Context, address string, timeout time.Durat
return nil, errors.New("no timeout specified")
}
if !strings.HasPrefix(address, "http") {
address = fmt.Sprintf("http://%s", address)
}
if !allowInsecure {
// Ensure the connection is either secure or local.
connectionURL, err := url.Parse(address)