eth/downloader: fix rollback issue on short chains

pull/21472/head
Martin Holst Swende 4 years ago
parent a70a79b285
commit 9f7b79af00
No known key found for this signature in database
GPG Key ID: 683B438C05A5DDF0
  1. 2
      eth/downloader/downloader.go

@ -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

Loading…
Cancel
Save