Skip to content

Commit

Permalink
Merge pull request #21472 from holiman/fix_dltest_fail
Browse files Browse the repository at this point in the history
eth/downloader: fix rollback issue on short chains
  • Loading branch information
karalabe authored Aug 21, 2020
2 parents 4e54b1a + 9f7b79a commit b68929c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions eth/downloader/downloader.go
Original file line number Diff line number Diff line change
Expand Up @@ -1502,6 +1502,8 @@ func (d *Downloader) processHeaders(origin uint64, pivot uint64, td *big.Int) er
head := chunk[len(chunk)-1].Number.Uint64()
if head-rollback > uint64(fsHeaderSafetyNet) {
rollback = head - uint64(fsHeaderSafetyNet)
} else {
rollback = 1
}
}
// Unless we're doing light chains, schedule the headers for associated content retrieval
Expand Down

0 comments on commit b68929c

Please sign in to comment.