mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2024-12-22 03:30:37 +00:00
allow erigon download .torrent from webseed by default (#9052)
This commit is contained in:
parent
95434d100e
commit
657aafd5b7
@ -763,7 +763,6 @@ func (d *DownloadSnapshots) Run(ctx *Context) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
downloaderCfg.DownloadTorrentFilesFromWebseed = true
|
||||
downlo, err := downloader.New(ctx, downloaderCfg, dirs, log.Root(), log.LvlInfo, true)
|
||||
if err != nil {
|
||||
return err
|
||||
|
@ -198,7 +198,6 @@ func Downloader(ctx context.Context, logger log.Logger) error {
|
||||
}
|
||||
downloadernat.DoNat(natif, cfg.ClientConfig, logger)
|
||||
|
||||
cfg.DownloadTorrentFilesFromWebseed = true // enable it only for standalone mode now. feature is not fully ready yet
|
||||
d, err := downloader.New(ctx, cfg, dirs, logger, log.LvlInfo, seedbox)
|
||||
if err != nil {
|
||||
return err
|
||||
|
@ -192,7 +192,7 @@ func New(dirs datadir.Dirs, version string, verbosity lg.Level, downloadRate, up
|
||||
return &Cfg{Dirs: dirs, ChainName: chainName,
|
||||
ClientConfig: torrentConfig, DownloadSlots: downloadSlots,
|
||||
WebSeedUrls: webseedHttpProviders, WebSeedFiles: webseedFileProviders, WebSeedS3Tokens: webseedS3Providers,
|
||||
DownloadTorrentFilesFromWebseed: false, ExpectedTorrentFilesHashes: snapCfg.Preverified,
|
||||
DownloadTorrentFilesFromWebseed: true, ExpectedTorrentFilesHashes: snapCfg.Preverified,
|
||||
}, nil
|
||||
}
|
||||
|
||||
|
@ -239,6 +239,7 @@ func (d *WebSeeds) downloadTorrentFilesFromProviders(ctx context.Context, rootDi
|
||||
}
|
||||
var addedNew int
|
||||
e, ctx := errgroup.WithContext(ctx)
|
||||
e.SetLimit(1024)
|
||||
urlsByName := d.TorrentUrls()
|
||||
//TODO:
|
||||
// - what to do if node already synced?
|
||||
|
Loading…
Reference in New Issue
Block a user