Documentation ¶
Index ¶
- Variables
- type Broker
- type Engine
- func (e *Engine) GetRewardsDistributionMultiplier(party string) num.Decimal
- func (e *Engine) GetRewardsVestingMultiplier(party string) num.Decimal
- func (e *Engine) OnBenefitTiersUpdate(_ context.Context, v interface{}) error
- func (e *Engine) OnEpochEvent(ctx context.Context, epoch types.Epoch)
- func (e *Engine) OnEpochRestore(ctx context.Context, epoch types.Epoch)
- func (e *Engine) OnMinQuantumOpenNationalVolumeUpdate(_ context.Context, v *num.Uint) error
- func (e *Engine) OnMinQuantumTradeVolumeUpdate(_ context.Context, v *num.Uint) error
- type MarketsStatsAggregator
- type PartyActivity
- type SnapshotEngine
- func (e *SnapshotEngine) GetState(k string) ([]byte, []types.StateProvider, error)
- func (e *SnapshotEngine) Keys() []string
- func (e *SnapshotEngine) LoadState(_ context.Context, p *types.Payload) ([]types.StateProvider, error)
- func (e *SnapshotEngine) Namespace() types.SnapshotNamespace
- func (e *SnapshotEngine) Stopped() bool
Constants ¶
This section is empty.
Variables ¶
View Source
var ActivityStreakKey = (&types.PayloadActivityStreak{}).Key()
Functions ¶
This section is empty.
Types ¶
type Engine ¶
type Engine struct {
// contains filtered or unexported fields
}
func New ¶
func New( log *logging.Logger, marketStats MarketsStatsAggregator, broker Broker, ) *Engine
func (*Engine) GetRewardsDistributionMultiplier ¶
func (*Engine) GetRewardsVestingMultiplier ¶
func (*Engine) OnBenefitTiersUpdate ¶
func (*Engine) OnEpochRestore ¶
func (*Engine) OnMinQuantumOpenNationalVolumeUpdate ¶
type MarketsStatsAggregator ¶
type MarketsStatsAggregator interface {
GetMarketStats() map[string]*types.MarketStats
}
type PartyActivity ¶
type PartyActivity struct { Active uint64 Inactive uint64 RewardDistributionActivityMultiplier num.Decimal RewardVestingActivityMultiplier num.Decimal }
func (PartyActivity) IsActive ¶
func (p PartyActivity) IsActive() bool
func (*PartyActivity) ResetMultipliers ¶
func (p *PartyActivity) ResetMultipliers()
func (*PartyActivity) UpdateMultipliers ¶
func (p *PartyActivity) UpdateMultipliers(benefitTiers []*types.ActivityStreakBenefitTier)
type SnapshotEngine ¶
type SnapshotEngine struct {
*Engine
}
func NewSnapshotEngine ¶
func NewSnapshotEngine( log *logging.Logger, marketStats MarketsStatsAggregator, broker Broker, ) *SnapshotEngine
func (*SnapshotEngine) GetState ¶
func (e *SnapshotEngine) GetState(k string) ([]byte, []types.StateProvider, error)
func (*SnapshotEngine) Keys ¶
func (e *SnapshotEngine) Keys() []string
func (*SnapshotEngine) LoadState ¶
func (e *SnapshotEngine) LoadState(_ context.Context, p *types.Payload) ([]types.StateProvider, error)
func (*SnapshotEngine) Namespace ¶
func (e *SnapshotEngine) Namespace() types.SnapshotNamespace
func (*SnapshotEngine) Stopped ¶
func (e *SnapshotEngine) Stopped() bool
Click to show internal directories.
Click to hide internal directories.