Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

StageSnapshot struck: fix "no metadata yet" #621

Merged
merged 3 commits into from
Feb 25, 2025
Merged
Changes from all commits
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
4 changes: 2 additions & 2 deletions erigon-lib/downloader/webseed.go
Original file line number Diff line number Diff line change
Expand Up @@ -645,7 +645,7 @@ func (d *WebSeeds) DownloadAndSaveTorrentFile(ctx context.Context, name string)
continue // it's ok if some HTTP provider failed - try next one
}
res, err := d.callTorrentHttpProvider(ctx, parsedUrl, name)
if err != nil {
if err != nil || res == nil {
d.logger.Debug("[snapshots] .torrent from webseed rejected", "name", name, "err", err, "url", urlStr)
continue // it's ok if some HTTP provider failed - try next one
}
Expand All @@ -670,7 +670,7 @@ func (d *WebSeeds) callTorrentHttpProvider(ctx context.Context, url *url.URL, fi
request = request.WithContext(ctx)
resp, err := d.client.Do(request)
if err != nil {
return nil, fmt.Errorf("webseed.downloadTorrentFile: url=%s, %w", url.String(), err)
return nil, nil
}
defer resp.Body.Close()
//protect against too small and too big data
Expand Down