mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2024-12-23 04:03:49 +00:00
added mutex lock to avoid race condition in downloader (#5089)
* added mutex lock to avoid race condition in downloader * Revert "added mutex lock to avoid race condition in downloader" This reverts commit cc14bf539a7cdf552ffceda3a9aef2949ccac5c2. * using lock
This commit is contained in:
parent
8b34004372
commit
6e18bef60a
@ -224,10 +224,10 @@ func (d *Downloader) verify() error {
|
||||
func (d *Downloader) addSegments() error {
|
||||
logEvery := time.NewTicker(20 * time.Second)
|
||||
defer logEvery.Stop()
|
||||
if err := BuildTorrentFilesIfNeed(context.Background(), d.cfg.DataDir); err != nil {
|
||||
if err := BuildTorrentFilesIfNeed(context.Background(), d.SnapDir()); err != nil {
|
||||
return err
|
||||
}
|
||||
files, err := seedableSegmentFiles(d.cfg.DataDir)
|
||||
files, err := seedableSegmentFiles(d.SnapDir())
|
||||
if err != nil {
|
||||
return fmt.Errorf("seedableSegmentFiles: %w", err)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user