2021-01-28 19:43:32 +00:00
|
|
|
package settlement
|
|
|
|
|
|
|
|
import (
|
2022-12-23 17:35:35 +00:00
|
|
|
"github.com/TrueCloudLab/frostfs-node/pkg/morph/event"
|
2021-01-28 19:43:32 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
// AuditEvent is an event of the start of
|
|
|
|
// cash settlements for data audit.
|
|
|
|
type AuditEvent struct {
|
|
|
|
epoch uint64
|
|
|
|
}
|
|
|
|
|
2021-02-01 16:18:34 +00:00
|
|
|
type (
|
|
|
|
BasicIncomeCollectEvent = AuditEvent
|
|
|
|
BasicIncomeDistributeEvent = AuditEvent
|
|
|
|
)
|
|
|
|
|
2021-01-28 19:43:32 +00:00
|
|
|
// MorphEvent implements Neo:Morph event.
|
|
|
|
func (e AuditEvent) MorphEvent() {}
|
|
|
|
|
|
|
|
// NewAuditEvent creates new AuditEvent for epoch.
|
|
|
|
func NewAuditEvent(epoch uint64) event.Event {
|
|
|
|
return AuditEvent{
|
|
|
|
epoch: epoch,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Epoch returns the number of the epoch
|
|
|
|
// in which the event was generated.
|
|
|
|
func (e AuditEvent) Epoch() uint64 {
|
|
|
|
return e.epoch
|
|
|
|
}
|
2021-02-01 16:18:34 +00:00
|
|
|
|
|
|
|
// NewBasicIncomeCollectEvent for epoch.
|
|
|
|
func NewBasicIncomeCollectEvent(epoch uint64) event.Event {
|
|
|
|
return BasicIncomeCollectEvent{
|
|
|
|
epoch: epoch,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// NewBasicIncomeDistributeEvent for epoch.
|
|
|
|
func NewBasicIncomeDistributeEvent(epoch uint64) event.Event {
|
|
|
|
return BasicIncomeDistributeEvent{
|
|
|
|
epoch: epoch,
|
|
|
|
}
|
|
|
|
}
|