Skip to content

Commit

Permalink
Adjust POA to adhere to new SeatManager interface
Browse files Browse the repository at this point in the history
  • Loading branch information
jonastheis committed Nov 8, 2023
1 parent ae8da07 commit 409f2e3
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion pkg/protocol/sybilprotection/seatmanager/poa/poa.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,14 @@ func (s *SeatManager) OnlineCommittee() ds.Set[account.SeatIndex] {
return s.activityTracker.OnlineCommittee()
}

func (s *SeatManager) SeatCount() int {
func (s *SeatManager) SeatCountInSlot(slot iotago.SlotIndex) int {

Check failure on line 149 in pkg/protocol/sybilprotection/seatmanager/poa/poa.go

View workflow job for this annotation

GitHub Actions / golangci

[golangci] pkg/protocol/sybilprotection/seatmanager/poa/poa.go#L149

unused-parameter: parameter 'slot' seems to be unused, consider removing or renaming it as _ (revive)
Raw output
pkg/protocol/sybilprotection/seatmanager/poa/poa.go:149:39: unused-parameter: parameter 'slot' seems to be unused, consider removing or renaming it as _ (revive)
func (s *SeatManager) SeatCountInSlot(slot iotago.SlotIndex) int {
                                      ^
s.committeeMutex.RLock()
defer s.committeeMutex.RUnlock()

return s.committee.SeatCount()
}

func (s *SeatManager) SeatCountInEpoch(epoch iotago.EpochIndex) int {

Check failure on line 156 in pkg/protocol/sybilprotection/seatmanager/poa/poa.go

View workflow job for this annotation

GitHub Actions / golangci

[golangci] pkg/protocol/sybilprotection/seatmanager/poa/poa.go#L156

unused-parameter: parameter 'epoch' seems to be unused, consider removing or renaming it as _ (revive)
Raw output
pkg/protocol/sybilprotection/seatmanager/poa/poa.go:156:40: unused-parameter: parameter 'epoch' seems to be unused, consider removing or renaming it as _ (revive)
func (s *SeatManager) SeatCountInEpoch(epoch iotago.EpochIndex) int {
                                       ^
s.committeeMutex.RLock()
defer s.committeeMutex.RUnlock()

Expand Down

0 comments on commit 409f2e3

Please sign in to comment.