Skip to content

Commit

Permalink
eth/downloader: purge pre-merge sync code (#29281)
Browse files Browse the repository at this point in the history
This PR removes pre-merge sync logic from the downloader. Now-irrelevant tests are removed and others have been updated.
  • Loading branch information
jwasinger committed Apr 30, 2024
1 parent 2e8e35f commit 45baf21
Show file tree
Hide file tree
Showing 8 changed files with 182 additions and 1,710 deletions.
6 changes: 3 additions & 3 deletions eth/downloader/beaconsync.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ func (b *beaconBackfiller) resume() {
}()
// If the downloader fails, report an error as in beacon chain mode there
// should be no errors as long as the chain we're syncing to is valid.
if err := b.downloader.synchronise("", common.Hash{}, nil, nil, mode, true, b.started); err != nil {
if err := b.downloader.synchronise(mode, b.started); err != nil {
log.Error("Beacon backfilling failed", "err", err)
return
}
Expand Down Expand Up @@ -268,9 +268,9 @@ func (d *Downloader) findBeaconAncestor() (uint64, error) {
return start, nil
}

// fetchBeaconHeaders feeds skeleton headers to the downloader queue for scheduling
// fetchHeaders feeds skeleton headers to the downloader queue for scheduling
// until sync errors or is finished.
func (d *Downloader) fetchBeaconHeaders(from uint64) error {
func (d *Downloader) fetchHeaders(from uint64) error {
var head *types.Header
_, tail, _, err := d.skeleton.Bounds()
if err != nil {
Expand Down
872 changes: 71 additions & 801 deletions eth/downloader/downloader.go

Large diffs are not rendered by default.

0 comments on commit 45baf21

Please sign in to comment.