From 409f2e304b619301419e5565539bf123a5d70aa6 Mon Sep 17 00:00:00 2001 From: jonastheis <4181434+jonastheis@users.noreply.github.com> Date: Wed, 8 Nov 2023 21:24:41 +0800 Subject: [PATCH] Adjust POA to adhere to new SeatManager interface --- pkg/protocol/sybilprotection/seatmanager/poa/poa.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pkg/protocol/sybilprotection/seatmanager/poa/poa.go b/pkg/protocol/sybilprotection/seatmanager/poa/poa.go index f5c113c76..5319928af 100644 --- a/pkg/protocol/sybilprotection/seatmanager/poa/poa.go +++ b/pkg/protocol/sybilprotection/seatmanager/poa/poa.go @@ -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 { + s.committeeMutex.RLock() + defer s.committeeMutex.RUnlock() + + return s.committee.SeatCount() +} + +func (s *SeatManager) SeatCountInEpoch(epoch iotago.EpochIndex) int { s.committeeMutex.RLock() defer s.committeeMutex.RUnlock()