Unverified Commit b68929ca authored by Péter Szilágyi's avatar Péter Szilágyi Committed by GitHub

Merge pull request #21472 from holiman/fix_dltest_fail

eth/downloader: fix rollback issue on short chains
parents 4e54b1a4 9f7b79af
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment