[#326] ir: Make netmap processor to generate audit settlement events

Pass handler of audit settlement event to netmap event processor. Generate
AuditEvent in during new epoch processing.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2021-01-28 22:51:41 +03:00 committed by Alex Vanin
parent 4204a9f920
commit d4bd726c25
4 changed files with 65 additions and 60 deletions

View file

@ -1,6 +1,7 @@
package innerring
import (
"github.com/nspcc-dev/neofs-node/pkg/innerring/processors/settlement/audit"
"github.com/nspcc-dev/neofs-node/pkg/innerring/timers"
)
@ -9,3 +10,11 @@ type blockTimerWrapper timers.BlockTimer
func (t *blockTimerWrapper) ResetEpochTimer() error {
return (*timers.BlockTimer)(t).Reset()
}
type auditSettlementCalculator audit.Calculator
func (s *auditSettlementCalculator) ProcessAuditSettlements(epoch uint64) {
(*audit.Calculator)(s).Calculate(&audit.CalculatePrm{
Epoch: epoch,
})
}