Documentation
¶
Index ¶
Constants ¶
View Source
const DefaultBlockWorkers = uint64(2)
DefaultBlockWorkers is the number of blocks processed in parallel.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlockConsumer ¶
type BlockConsumer struct {
// contains filtered or unexported fields
}
BlockConsumer listens to the OnFinalizedBlock event and notifies the consumer to check in the job queue (i.e., its block reader) for new block jobs.
func NewBlockConsumer ¶
func NewBlockConsumer(log zerolog.Logger, metrics module.VerificationMetrics, processedHeight storage.ConsumerProgressInitializer, blocks storage.Blocks, state protocol.State, blockProcessor assigner.FinalizedBlockProcessor, maxProcessing uint64, finalizationRegistrar hotstuff.FinalizationRegistrar) (*BlockConsumer, uint64, error)
NewBlockConsumer creates a new consumer and returns the default processed index for initializing the processed index in storage.
func (*BlockConsumer) Done ¶
func (c *BlockConsumer) Done() <-chan struct{}
func (*BlockConsumer) NotifyJobIsDone ¶
func (c *BlockConsumer) NotifyJobIsDone(jobID module.JobID)
NotifyJobIsDone is invoked by the worker to let the consumer know that it is done processing a (block) job.
func (*BlockConsumer) Ready ¶
func (c *BlockConsumer) Ready() <-chan struct{}
func (*BlockConsumer) Size ¶ added in v0.17.6
func (c *BlockConsumer) Size() uint
Size returns number of in-memory block jobs that block consumer is processing.
Click to show internal directories.
Click to hide internal directories.