This repository was archived by the owner on Jan 24, 2025. It is now read-only.
File tree Expand file tree Collapse file tree
sybilprotection/seatmanager Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -75,24 +75,24 @@ func (s *inclusionFlags) OnRejected(callback func()) {
7575 s .rejected .OnTrigger (callback )
7676}
7777
78- // IsCommitted returns true if the entity was committed.
78+ // CommittedSlot returns the slot in which the entity is committed and a bool value indicating if the entity was committed.
7979func (s * inclusionFlags ) CommittedSlot () (slot iotago.SlotIndex , isCommitted bool ) {
8080 return s .committedSlot .Get (), s .committedSlot .Get () != 0
8181}
8282
83- // OnCommitted registers a callback that gets triggered when the entity gets committed.
83+ // OnCommittedSlotUpdated registers a callback that gets triggered when the slot in which the entity is committed gets updated. .
8484func (s * inclusionFlags ) OnCommittedSlotUpdated (callback func (slot iotago.SlotIndex )) {
8585 s .committedSlot .OnUpdate (func (_ iotago.SlotIndex , newValue iotago.SlotIndex ) {
8686 callback (newValue )
8787 })
8888}
8989
90- // IsOrphaned returns true if the entity was orphaned.
90+ // OrphanedSlot returns a slot in which the entity has been orphaned and a bool flag indicating whether it was orphaned.
9191func (s * inclusionFlags ) OrphanedSlot () (slot iotago.SlotIndex , isOrphaned bool ) {
9292 return s .orphanedSlot .Get (), s .orphanedSlot .Get () != 0
9393}
9494
95- // OnOrphaned registers a callback that gets triggered when the entity gets orphaned .
95+ // OnOrphanedSlotUpdated registers a callback that gets triggered when the orphaned slot is updated .
9696func (s * inclusionFlags ) OnOrphanedSlotUpdated (callback func (slot iotago.SlotIndex )) {
9797 s .orphanedSlot .OnUpdate (func (_ iotago.SlotIndex , newValue iotago.SlotIndex ) {
9898 callback (newValue )
Original file line number Diff line number Diff line change @@ -31,9 +31,10 @@ type SeatManager interface {
3131 // OnlineCommittee returns the set of online validators that is used to track acceptance.
3232 OnlineCommittee () ds.Set [account.SeatIndex ]
3333
34- // SeatCount returns the number of seats in the SeatManager.
34+ // SeatCountInSlot returns the number of seats in the SeatManager for the given slot's epoch .
3535 SeatCountInSlot (slot iotago.SlotIndex ) int
3636
37+ // SeatCountInEpoch returns the number of seats in the SeatManager for the given epoch.
3738 SeatCountInEpoch (epoch iotago.EpochIndex ) int
3839
3940 // Interface embeds the required methods of the module.Interface.
You can’t perform that action at this time.
0 commit comments