engine_block_downloader

package
v0.0.0-...-1f8a15b Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2023 License: GPL-3.0 Imports: 29 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, timeout int) *EngineBlockDownloader

func (*EngineBlockDownloader) StartDownloading

func (e *EngineBlockDownloader) StartDownloading(requestId int, hashToDownload libcommon.Hash, downloaderTip 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