Skip to content

Commit c40ebce

Browse files
jwasingerjorgemmsilva
authored andcommitted
eth/downloader: purge pre-merge sync code (ethereum#29281)
This PR removes pre-merge sync logic from the downloader. Now-irrelevant tests are removed and others have been updated.
1 parent 98c935d commit c40ebce

File tree

8 files changed

+182
-1710
lines changed

8 files changed

+182
-1710
lines changed

eth/downloader/beaconsync.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ func (b *beaconBackfiller) resume() {
106106
}()
107107
// If the downloader fails, report an error as in beacon chain mode there
108108
// should be no errors as long as the chain we're syncing to is valid.
109-
if err := b.downloader.synchronise("", common.Hash{}, nil, nil, mode, true, b.started); err != nil {
109+
if err := b.downloader.synchronise(mode, b.started); err != nil {
110110
log.Error("Beacon backfilling failed", "err", err)
111111
return
112112
}
@@ -268,9 +268,9 @@ func (d *Downloader) findBeaconAncestor() (uint64, error) {
268268
return start, nil
269269
}
270270

271-
// fetchBeaconHeaders feeds skeleton headers to the downloader queue for scheduling
271+
// fetchHeaders feeds skeleton headers to the downloader queue for scheduling
272272
// until sync errors or is finished.
273-
func (d *Downloader) fetchBeaconHeaders(from uint64) error {
273+
func (d *Downloader) fetchHeaders(from uint64) error {
274274
var head *types.Header
275275
_, tail, _, err := d.skeleton.Bounds()
276276
if err != nil {

eth/downloader/downloader.go

Lines changed: 71 additions & 801 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)