Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlockEntry ¶
type BlockEntry struct { BlockID flow.Identifier Height uint64 ExecutionData *execution_data.BlockExecutionDataEntity }
BlockEntry represents a block that's tracked by the ExecutionDataRequester
func JobToBlockEntry ¶
func JobToBlockEntry(job module.Job) (*BlockEntry, error)
JobToBlockEntry converts a block entry job into its corresponding BlockEntry.
type BlockEntryJob ¶
type BlockEntryJob struct {
Entry *BlockEntry
}
BlockEntryJob implements the Job interface. It converts a BlockEntry into a Job to be used by job queue.
In current architecture, BlockEntryJob represents a ExecutionData notification enqueued to be processed by the NotificationConsumer that implements the JobQueue interface.
func BlockEntryToJob ¶
func BlockEntryToJob(entry *BlockEntry) *BlockEntryJob
BlockEntryToJob converts the BlockEntry to a BlockEntryJob.
func (BlockEntryJob) ID ¶
func (j BlockEntryJob) ID() module.JobID
ID converts block id into job id, which guarantees uniqueness.
type ExecutionDataReader ¶
type ExecutionDataReader struct {
// contains filtered or unexported fields
}
ExecutionDataReader provides an abstraction for consumers to read blocks as job.
func NewExecutionDataReader ¶
func NewExecutionDataReader( downloader execution_data.Downloader, headers storage.Headers, results storage.ExecutionResults, seals storage.Seals, fetchTimeout time.Duration, highestAvailableHeight func() uint64, ) *ExecutionDataReader
NewExecutionDataReader creates and returns a ExecutionDataReader.
func (*ExecutionDataReader) AddContext ¶
func (r *ExecutionDataReader) AddContext(ctx irrecoverable.SignalerContext)
AddContext adds a context to the execution data reader TODO: this is an anti-pattern, refactor this to accept a context in AtIndex instead of storing it on the struct.
func (*ExecutionDataReader) AtIndex ¶
func (r *ExecutionDataReader) AtIndex(height uint64) (module.Job, error)
AtIndex returns the block entry job at the given height, or storage.ErrNotFound. Any other error is unexpected
func (*ExecutionDataReader) Head ¶
func (r *ExecutionDataReader) Head() (uint64, error)
Head returns the highest consecutive block height with downloaded execution data