eventloop

package
v0.29.16-temp-fix-sid Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2023 License: AGPL-3.0 Imports: 13 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EventLoop

type EventLoop struct {
	*component.ComponentManager
	// contains filtered or unexported fields
}

EventLoop buffers all incoming events to the hotstuff EventHandler, and feeds EventHandler one event at a time.

func NewEventLoop

func NewEventLoop(log zerolog.Logger, metrics module.HotstuffMetrics, eventHandler hotstuff.EventHandler, startTime time.Time) (*EventLoop, error)

NewEventLoop creates an instance of EventLoop.

func (*EventLoop) OnNewQcDiscovered added in v0.29.0

func (el *EventLoop) OnNewQcDiscovered(qc *flow.QuorumCertificate)

OnNewQcDiscovered pushes already validated QCs that were submitted from TimeoutAggregator to the event handler

func (*EventLoop) OnNewTcDiscovered added in v0.29.0

func (el *EventLoop) OnNewTcDiscovered(tc *flow.TimeoutCertificate)

OnNewTcDiscovered pushes already validated TCs that were submitted from TimeoutAggregator to the event handler

func (*EventLoop) OnPartialTcCreated added in v0.29.0

func (el *EventLoop) OnPartialTcCreated(view uint64, newestQC *flow.QuorumCertificate, lastViewTC *flow.TimeoutCertificate)

OnPartialTcCreated created a hotstuff.PartialTcCreated payload and pushes it into partialTcCreated buffered channel for further processing by EventHandler. Since we use buffered channel this function can block if buffer is full.

func (*EventLoop) OnQcConstructedFromVotes added in v0.29.0

func (el *EventLoop) OnQcConstructedFromVotes(qc *flow.QuorumCertificate)

OnQcConstructedFromVotes implements hotstuff.QCCreatedConsumer and pushes received qc into processing pipeline.

func (*EventLoop) OnTcConstructedFromTimeouts added in v0.29.0

func (el *EventLoop) OnTcConstructedFromTimeouts(tc *flow.TimeoutCertificate)

OnTcConstructedFromTimeouts pushes the received TC to the timeoutCertificates channel

func (*EventLoop) SubmitProposal

func (el *EventLoop) SubmitProposal(proposal *model.Proposal)

SubmitProposal pushes the received block to the proposals channel

Jump to

Keyboard shortcuts

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