Skip to content

Commit

Permalink
Snapshots: retire testing tool (#3684)
Browse files Browse the repository at this point in the history
  • Loading branch information
AskAlexSharov authored Mar 12, 2022
1 parent aed679c commit f03d08c
Show file tree
Hide file tree
Showing 11 changed files with 34 additions and 2,792 deletions.
375 changes: 0 additions & 375 deletions cmd/downloader/debug/debug_test.go

This file was deleted.

6 changes: 3 additions & 3 deletions cmd/downloader/downloader/downloader.go
Original file line number Diff line number Diff line change
Expand Up @@ -243,11 +243,11 @@ func AddTorrentFiles(ctx context.Context, snapshotsDir *dir.Rw, torrentClient *t
// ResolveAbsentTorrents - add hard-coded hashes (if client doesn't have) as magnet links and download everything
func ResolveAbsentTorrents(ctx context.Context, torrentClient *torrent.Client, preverifiedHashes []metainfo.Hash, snapshotDir *dir.Rw, silent bool) error {
mi := &metainfo.MetaInfo{AnnounceList: Trackers}
for _, infoHash := range preverifiedHashes {
if _, ok := torrentClient.Torrent(infoHash); ok {
for i := range preverifiedHashes {
if _, ok := torrentClient.Torrent(preverifiedHashes[i]); ok {
continue
}
magnet := mi.Magnet(&infoHash, nil)
magnet := mi.Magnet(&preverifiedHashes[i], nil)
t, err := torrentClient.AddMagnet(magnet.String())
if err != nil {
return err
Expand Down
Loading

0 comments on commit f03d08c

Please sign in to comment.