[#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:
parent
4204a9f920
commit
d4bd726c25
4 changed files with 65 additions and 60 deletions
|
@ -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,
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue