Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Election ¶
Election is cached data of election algorithm.
func New ¶
func New( validators *pos.Validators, frameToDecide idx.Frame, forklessCauseFn ForklessCauseFn, getFrameRoots GetFrameRootsFn, ) *Election
New election context
func (*Election) DebugStateHash ¶
DebugStateHash may be used in tests to match election state
func (*Election) ProcessRoot ¶
func (el *Election) ProcessRoot(newRoot RootAndSlot) (*Res, error)
ProcessRoot calculates Atropos votes only for the new root. If this root observes that the current election is decided, then return decided Atropos
type ForklessCauseFn ¶
ForklessCauseFn returns true if event A is forkless caused by event B
type GetFrameRootsFn ¶
type GetFrameRootsFn func(f idx.Frame) []RootAndSlot
GetFrameRootsFn returns all the roots in the specified frame
type RootAndSlot ¶
RootAndSlot specifies concrete root of slot.
Click to show internal directories.
Click to hide internal directories.