Fix another case of header download hanging (non-POS) (#8356)

This commit is contained in:
ledgerwatch 2023-10-03 17:34:03 +01:00 committed by GitHub
parent 3f590505bd
commit 2521f1a696
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -521,7 +521,7 @@ func (hd *HeaderDownload) InsertHeader(hf FeedHeaderFunc, terminalTotalDifficult
var returnTd *big.Int
var lastD *big.Int
var lastTime uint64
if hd.insertQueue.Len() > 0 && hd.insertQueue[0].blockHeight <= hd.highestInDb+1 {
if hd.insertQueue.Len() > 0 {
link := hd.insertQueue[0]
_, bad := hd.badHeaders[link.hash]
if !bad && !link.persisted {