Documentation ¶
Index ¶
- Variables
- type ActivityStreakVestingMultiplier
- type Assets
- type Broker
- type Collateral
- type Config
- type Engine
- func (e *Engine) AddReward(party, asset string, amount *num.Uint, lockedForEpochs uint64)
- func (e *Engine) GetRewardBonusMultiplier(party string) (*num.Uint, num.Decimal)
- func (e *Engine) OnBenefitTiersUpdate(_ context.Context, v interface{}) error
- func (e *Engine) OnCheckpointLoaded()
- func (e *Engine) OnEpochEvent(ctx context.Context, epoch types.Epoch)
- func (e *Engine) OnEpochRestore(ctx context.Context, epoch types.Epoch)
- func (e *Engine) OnRewardVestingBaseRateUpdate(_ context.Context, baseRate num.Decimal) error
- func (e *Engine) OnRewardVestingMinimumTransferUpdate(_ context.Context, minimumTransfer num.Decimal) error
- func (e *Engine) OnTick(ctx context.Context, _ time.Time)
- type PartyRewards
- type SnapshotEngine
- func (e *SnapshotEngine) GetState(k string) ([]byte, []types.StateProvider, error)
- func (e *SnapshotEngine) Keys() []string
- func (e *SnapshotEngine) LoadState(ctx 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 VestingKey = (&types.PayloadVesting{}).Key()
Functions ¶
This section is empty.
Types ¶
type Collateral ¶
type Config ¶
func NewDefaultConfig ¶
func NewDefaultConfig() Config
NewDefaultConfig creates an instance of the package specific configuration.
type Engine ¶
type Engine struct {
// contains filtered or unexported fields
}
func New ¶
func New( log *logging.Logger, c Collateral, asvm ActivityStreakVestingMultiplier, broker Broker, assets Assets, ) *Engine
func (*Engine) GetRewardBonusMultiplier ¶
func (*Engine) OnBenefitTiersUpdate ¶
func (*Engine) OnCheckpointLoaded ¶
func (e *Engine) OnCheckpointLoaded()
func (*Engine) OnEpochRestore ¶
func (*Engine) OnRewardVestingBaseRateUpdate ¶
func (*Engine) OnRewardVestingMinimumTransferUpdate ¶
type PartyRewards ¶
type PartyRewards struct { // the amounts per assets still being locked in the // account and not available to be released // this is a map of: // asset -> (remainingEpochLock -> Amount) Locked map[string]map[uint64]*num.Uint // the current part of the vesting account // per asset available for vesting Vesting map[string]*num.Uint }
type SnapshotEngine ¶
type SnapshotEngine struct {
*Engine
}
func NewSnapshotEngine ¶
func NewSnapshotEngine( log *logging.Logger, c Collateral, asvm ActivityStreakVestingMultiplier, broker Broker, assets Assets, ) *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(ctx 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.