Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion validator/client/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,14 @@ func (v *ValidatorService) Start() {
}

u := strings.ReplaceAll(v.conn.GetBeaconApiUrl(), " ", "")
hosts := strings.Split(u, ",")
rawHosts := strings.Split(u, ",")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please add a unit test and changelog

hosts := make([]string, 0, len(rawHosts))
for _, host := range rawHosts {
if host == "" {
continue
}
hosts = append(hosts, host)
}
if len(hosts) == 0 {
log.WithError(err).Error("No API hosts provided")
return
Expand Down