diff --git a/turbo/engineapi/engine_block_downloader/body.go b/turbo/engineapi/engine_block_downloader/body.go index 312d48d52..0ca0daa28 100644 --- a/turbo/engineapi/engine_block_downloader/body.go +++ b/turbo/engineapi/engine_block_downloader/body.go @@ -101,6 +101,7 @@ func (e *EngineBlockDownloader) downloadAndLoadBodiesSyncronously(tx kv.RwTx, fr toProcess := e.bd.NextProcessingCount() + write := true for i := uint64(0); i < toProcess; i++ { select { case <-logEvery.C: @@ -108,9 +109,12 @@ func (e *EngineBlockDownloader) downloadAndLoadBodiesSyncronously(tx kv.RwTx, fr default: } nextBlock := requestedLow + i - rawBody := e.bd.GetBodyFromCache(nextBlock, true) + rawBody := e.bd.GetBodyFromCache(nextBlock, write) if rawBody == nil { e.bd.NotDelivered(nextBlock) + write = false + } + if !write { continue }