Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexey Sharp authored and Alexey Sharp committed Apr 25, 2022
1 parent ee5a1e8 commit 1dca25b
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions eth/stagedsync/stage_headers.go
Original file line number Diff line number Diff line change
Expand Up @@ -1196,6 +1196,9 @@ func WaitForDownloader(ctx context.Context, tx kv.RwTx, cfg HeadersCfg) error {
time.Sleep(10 * time.Second)
continue
}
if _, err := cfg.snapshotDownloader.Stats(ctx, &proto_downloader.StatsRequest{}); err != nil {
log.Warn("Error while waiting for snapshots progress", "err", err)
}
break
}
// Now send all info hashes 1 by one
Expand All @@ -1220,12 +1223,6 @@ func WaitForDownloader(ctx context.Context, tx kv.RwTx, cfg HeadersCfg) error {
}
log.Info("Requested download", "file", p.Name)

if reply, err := cfg.snapshotDownloader.Stats(ctx, &proto_downloader.StatsRequest{}); err != nil {
log.Warn("Error while waiting for snapshots progress", "err", err)
} else if reply.Completed {
continue
}

// Print download progress until all segments are available
Loop:
for {
Expand Down

0 comments on commit 1dca25b

Please sign in to comment.