This repository was archived by the owner on Jan 24, 2025. It is now read-only.
File tree 2 files changed +6
-5
lines changed
sybilprotection/seatmanager 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -75,24 +75,24 @@ func (s *inclusionFlags) OnRejected(callback func()) {
75
75
s .rejected .OnTrigger (callback )
76
76
}
77
77
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.
79
79
func (s * inclusionFlags ) CommittedSlot () (slot iotago.SlotIndex , isCommitted bool ) {
80
80
return s .committedSlot .Get (), s .committedSlot .Get () != 0
81
81
}
82
82
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. .
84
84
func (s * inclusionFlags ) OnCommittedSlotUpdated (callback func (slot iotago.SlotIndex )) {
85
85
s .committedSlot .OnUpdate (func (_ iotago.SlotIndex , newValue iotago.SlotIndex ) {
86
86
callback (newValue )
87
87
})
88
88
}
89
89
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.
91
91
func (s * inclusionFlags ) OrphanedSlot () (slot iotago.SlotIndex , isOrphaned bool ) {
92
92
return s .orphanedSlot .Get (), s .orphanedSlot .Get () != 0
93
93
}
94
94
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 .
96
96
func (s * inclusionFlags ) OnOrphanedSlotUpdated (callback func (slot iotago.SlotIndex )) {
97
97
s .orphanedSlot .OnUpdate (func (_ iotago.SlotIndex , newValue iotago.SlotIndex ) {
98
98
callback (newValue )
Original file line number Diff line number Diff line change @@ -31,9 +31,10 @@ type SeatManager interface {
31
31
// OnlineCommittee returns the set of online validators that is used to track acceptance.
32
32
OnlineCommittee () ds.Set [account.SeatIndex ]
33
33
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 .
35
35
SeatCountInSlot (slot iotago.SlotIndex ) int
36
36
37
+ // SeatCountInEpoch returns the number of seats in the SeatManager for the given epoch.
37
38
SeatCountInEpoch (epoch iotago.EpochIndex ) int
38
39
39
40
// Interface embeds the required methods of the module.Interface.
You can’t perform that action at this time.
0 commit comments