round

package
v0.14.9-error-printing Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2021 License: AGPL-3.0 Imports: 3 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Round

type Round struct {
	// contains filtered or unexported fields
}

Round keeps track of the current consensus state.

func New

func New(head *flow.Header, me module.Local, participants flow.IdentityList) (*Round, error)

New creates a new consensus round.

func (*Round) Candidate

func (r *Round) Candidate() *flow.Header

Candidate returns the current candidate header.

func (*Round) Leader

func (r *Round) Leader() *flow.Identity

Leader returns the the leader of the current round.

func (*Round) Parent

func (r *Round) Parent() *flow.Header

Parent returns the parent of the to-be-formed block.

func (*Round) Participants

func (r *Round) Participants() flow.IdentityList

Participants will retrieve cached identities for this round.

func (*Round) Propose

func (r *Round) Propose(candidate *flow.Header)

Propose sets the current candidate header.

func (*Round) Quorum

func (r *Round) Quorum() uint64

Quorum returns the quorum for a qualified majority in this round.

func (*Round) Tally

func (r *Round) Tally(voterID flow.Identifier, stake uint64)

Tally will add the given vote to the node tally.

func (*Round) Voted

func (r *Round) Voted(nodeID flow.Identifier) bool

Voted checks if the given node has already voted.

func (*Round) Votes

func (r *Round) Votes() uint64

Votes will count the total votes.

Jump to

Keyboard shortcuts

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