engine_block_downloader

package
v3.0.0-alpha5.0...-c974331 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 30, 2024 License: LGPL-3.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EngineBlockDownloader

type EngineBlockDownloader struct {
	// contains filtered or unexported fields
}

EngineBlockDownloader is responsible to download blocks in reverse, and then insert them in the database.

func NewEngineBlockDownloader

func NewEngineBlockDownloader(ctx context.Context, logger log.Logger, hd *headerdownload.HeaderDownload, executionClient execution.ExecutionClient,
	bd *bodydownload.BodyDownload, blockPropagator adapter.BlockPropagator,
	bodyReqSend RequestBodyFunction, blockReader services.FullBlockReader, db kv.RoDB, config *chain.Config,
	tmpdir string, syncCfg ethconfig.Sync) *EngineBlockDownloader

func (*EngineBlockDownloader) StartDownloading

func (e *EngineBlockDownloader) StartDownloading(ctx context.Context, requestId int, hashToDownload libcommon.Hash, blockTip *types.Block) bool

StartDownloading triggers the download process and returns true if the process started or false if it could not. blockTip is optional and should be the block tip of the download request. which will be inserted at the end of the procedure if specified.

func (*EngineBlockDownloader) Status

type RequestBodyFunction

type RequestBodyFunction func(context.Context, *bodydownload.BodyRequest) ([64]byte, bool)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL