Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion turbo/engineapi/engine_block_downloader/core.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@ import (
func (e *EngineBlockDownloader) download(ctx context.Context, hashToDownload libcommon.Hash, requestId int, block *types.Block) {
/* Start download process*/
// First we schedule the headers download process
if !e.scheduleHeadersDownload(requestId, hashToDownload, 0) {
heightToDownload := uint64(0)
if block != nil {
heightToDownload = block.NumberU64()
}
if !e.scheduleHeadersDownload(requestId, hashToDownload, heightToDownload) {
e.logger.Warn("[EngineBlockDownloader] could not begin header download")
// could it be scheduled? if not nevermind.
e.status.Store(headerdownload.Idle)
Expand Down
2 changes: 1 addition & 1 deletion turbo/stages/headerdownload/header_algos.go
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ func (hd *HeaderDownload) requestMoreHeadersForPOS(currentTime time.Time) (timeo
return
}

hd.logger.Debug("[downloader] Request header", "numer", anchor.blockHeight-1, "length", 192)
hd.logger.Debug("[downloader] Request header", "number", anchor.blockHeight-1, "length", 192)

// Request ancestors
request = &HeaderRequest{
Expand Down