From 9a9db2d90b0c5c66d1d47b4242a5f4ef7203e05d Mon Sep 17 00:00:00 2001 From: Alex Sharov Date: Wed, 15 Nov 2023 11:23:57 +0700 Subject: [PATCH] downloader: whitelist only .seg.torrent files. (#8729) --- erigon-lib/downloader/webseed.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/erigon-lib/downloader/webseed.go b/erigon-lib/downloader/webseed.go index 408aa2419..31f6829be 100644 --- a/erigon-lib/downloader/webseed.go +++ b/erigon-lib/downloader/webseed.go @@ -227,12 +227,10 @@ func (d *WebSeeds) downloadTorrentFilesFromProviders(ctx context.Context, rootDi continue } addedNew++ - if strings.HasSuffix(name, ".v.torrent") || strings.HasSuffix(name, ".ef.torrent") { + if !strings.HasSuffix(name, ".seg.torrent") { _, fName := filepath.Split(name) - if strings.HasPrefix(fName, "commitment") { - d.logger.Log(d.verbosity, "[snapshots] webseed has .torrent, but we skip it because we don't support it yet", "name", name) - continue - } + d.logger.Log(d.verbosity, "[snapshots] webseed has .torrent, but we skip it because this type not supported yet", "name", fName) + continue } name := name tUrls := tUrls