Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Candidates ¶ added in v1.1.5
type Candidates struct {
// contains filtered or unexported fields
}
Candidates holds candidates list in memory, and tends to be reused in PoA stage without querying from contract.
func NewCandidates ¶ added in v1.1.5
func NewCandidates(list []*authority.Candidate) *Candidates
NewCandidates creates candidates list.
func (*Candidates) InvalidateCache ¶ added in v1.1.5
func (c *Candidates) InvalidateCache()
InvalidateCache invalidate the result cache of Pick method.
func (*Candidates) IsEndorsor ¶ added in v1.1.5
func (c *Candidates) IsEndorsor(addr thor.Address) bool
IsEndorsor returns whether an address is an endorsor.
type Scheduler ¶
type Scheduler struct {
// contains filtered or unexported fields
}
Scheduler to schedule the time when a proposer to produce a block.
func NewScheduler ¶
func NewScheduler( addr thor.Address, proposers []Proposer, parentBlockNumber uint32, parentBlockTime uint64) (*Scheduler, error)
NewScheduler create a Scheduler object. `addr` is the proposer to be scheduled. If `addr` is not listed in `proposers`, an error returned.
Click to show internal directories.
Click to hide internal directories.