Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var NewEvents = event.CreateGroupConstructor(func() (newEvents *Events) { return &Events{ VotersUpdated: event.New1[*VoterUpdatedEvent](), } })
NewEvents contains the constructor of the Events object (it is generated by a generic factory).
Functions ¶
This section is empty.
Types ¶
type SlotTracker ¶
type SlotTracker struct { Events *Events // contains filtered or unexported fields }
func NewSlotTracker ¶
func NewSlotTracker(cutoffIndexCallback func() slot.Index) *SlotTracker
func (*SlotTracker) EvictSlot ¶
func (s *SlotTracker) EvictSlot(indexToEvict slot.Index)
func (*SlotTracker) TrackVotes ¶
func (s *SlotTracker) TrackVotes(slotIndex slot.Index, voterID identity.ID, power SlotVotePower)
func (*SlotTracker) Voters ¶
func (s *SlotTracker) Voters(slotIndex slot.Index) *advancedset.AdvancedSet[identity.ID]
type SlotVotePower ¶
func (SlotVotePower) Compare ¶
func (p SlotVotePower) Compare(other SlotVotePower) int
type TestFramework ¶
type TestFramework struct { SlotTracker *SlotTracker Votes *votes.TestFramework // contains filtered or unexported fields }
func NewDefaultTestFramework ¶
func NewDefaultTestFramework(t *testing.T) *TestFramework
func NewTestFramework ¶
func NewTestFramework(test *testing.T, slotTracker *SlotTracker, votesTF *votes.TestFramework) *TestFramework
NewTestFramework is the constructor of the TestFramework.
func (*TestFramework) ValidateSlotVoters ¶
func (t *TestFramework) ValidateSlotVoters(expectedVoters map[slot.Index]*advancedset.AdvancedSet[identity.ID])
Click to show internal directories.
Click to hide internal directories.