committee

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: May 8, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Committee

type Committee interface {
	Reader

	Update(lastRound int16, joined []*validator.Validator)
}

func GenerateTestCommittee

func GenerateTestCommittee(num int) (Committee, []crypto.Signer)

GenerateTestCommittee generates a committee for testing purpose. All committee members have same power.

func NewCommittee

func NewCommittee(validators []*validator.Validator, committeeSize int,
	proposerAddress crypto.Address) (Committee, error)

type Reader

type Reader interface {
	Validators() []*validator.Validator
	Committers() []int32
	Contains(addr crypto.Address) bool
	Proposer(round int16) *validator.Validator
	IsProposer(addr crypto.Address, round int16) bool
	Size() int
	TotalPower() int64
}

Jump to

Keyboard shortcuts

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