Skip to content

Commit

Permalink
eth/downloader: remove unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
rjl493456442 authored and jwasinger committed Apr 30, 2024
1 parent 8914a38 commit 1d6956a
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions eth/downloader/downloader.go
Original file line number Diff line number Diff line change
Expand Up @@ -694,17 +694,12 @@ func (d *Downloader) processHeaders(origin uint64) error {
// Although the received headers might be all valid, a legacy
// PoW/PoA sync must not accept post-merge headers. Make sure
// that any transition is rejected at this point.
var rejected []*types.Header
if len(chunkHeaders) > 0 {
if n, err := d.lightchain.InsertHeaderChain(chunkHeaders); err != nil {
log.Warn("Invalid header encountered", "number", chunkHeaders[n].Number, "hash", chunkHashes[n], "parent", chunkHeaders[n].ParentHash, "err", err)
return fmt.Errorf("%w: %v", errInvalidChain, err)
}
}
if len(rejected) != 0 {
log.Info("Legacy sync reached merge threshold", "number", rejected[0].Number, "hash", rejected[0].Hash())
return ErrMergeTransition
}
}
// Unless we're doing light chains, schedule the headers for associated content retrieval
if mode == FullSync || mode == SnapSync {
Expand Down

0 comments on commit 1d6956a

Please sign in to comment.