manager

package
v0.6.11 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 3, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type WeightedMedianPriceManager added in v0.4.0

type WeightedMedianPriceManager struct {
	// contains filtered or unexported fields
}

func NewWeightedMedianPriceManager added in v0.4.0

func NewWeightedMedianPriceManager(key sdk.StoreKey, val validator.ValidatorKeeper, param param.ParamKeeper) WeightedMedianPriceManager

func (WeightedMedianPriceManager) CoinToMiniDollar added in v0.4.0

func (wm WeightedMedianPriceManager) CoinToMiniDollar(ctx sdk.Context, coin linotypes.Coin) (linotypes.MiniDollar, sdk.Error)

func (WeightedMedianPriceManager) CurrPrice added in v0.4.0

func (WeightedMedianPriceManager) FeedPrice added in v0.4.0

FeedPrice - validator update price. validation: 1. price is positive. 2. feeder is a validator. 3. can only update after FeedEvery.

func (WeightedMedianPriceManager) HistoryPrice added in v0.4.0

func (wm WeightedMedianPriceManager) HistoryPrice(ctx sdk.Context) []model.FeedHistory

func (WeightedMedianPriceManager) InitGenesis added in v0.4.0

func (wm WeightedMedianPriceManager) InitGenesis(ctx sdk.Context, initPrice linotypes.MiniDollar) sdk.Error

set current price.

func (WeightedMedianPriceManager) LastFeed added in v0.6.4

func (WeightedMedianPriceManager) MiniDollarToCoin added in v0.4.0

func (WeightedMedianPriceManager) UpdatePrice added in v0.4.0

func (wm WeightedMedianPriceManager) UpdatePrice(ctx sdk.Context) sdk.Error

UpdateHourlyPrice - update hourly weighted price. premise: FedPrice is positive. 1. Get Current Validator List, with weight. 2. set prices of validators. 3. remove invalid. 4. get weighted median if at least one validator. 5. otherwise, use the previsous price.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL