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 ¶
func (e *EngineBlockDownloader) Status() headerdownload.SyncStatus
type RequestBodyFunction ¶
type RequestBodyFunction func(context.Context, *bodydownload.BodyRequest) ([64]byte, bool)
Click to show internal directories.
Click to hide internal directories.