fix deduplication (#8640)

This commit is contained in:
Nishant Das 2021-03-22 22:07:58 +08:00 committed by GitHub
parent eca67cec4c
commit b346cde919
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -180,11 +180,11 @@ func NewService(ctx context.Context, config *Web3ServiceConfig) (*Service, error
config.Eth1HeaderReqLimit = defaultEth1HeaderReqLimit
}
endpoints := dedupEndpoints(config.HTTPEndpoints)
config.HTTPEndpoints = dedupEndpoints(config.HTTPEndpoints)
// Select first http endpoint in the provided list.
currEndpoint := ""
if len(endpoints) > 0 {
currEndpoint = endpoints[0]
if len(config.HTTPEndpoints) > 0 {
currEndpoint = config.HTTPEndpoints[0]
}
s := &Service{
cfg: config,