Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MedianCheck ¶
func MedianCheck(val1Client *client.UmeeClient) error
MedianCheck waits for availability of all exchange rates from the denom accept list, records historical stamp data based on the oracle params, computes the median/median deviation and then compares that to the data in the median/median deviation gRPC query
func OracleParamChanges ¶
func OracleParamChanges( historicStampPeriod uint64, maximumPriceStamps uint64, medianStampPeriod uint64, ) []proposal.ParamChange
func SubmitAndPassProposal ¶
func SubmitAndPassProposal(umeeClient *client.UmeeClient, changes []proposal.ParamChange) error
Types ¶
type ChainHeight ¶
type ChainHeight struct { Logger zerolog.Logger HeightChanged chan (int64) // contains filtered or unexported fields }
ChainHeight is used to cache the chain height of the current node which is being updated each time the node sends an event of EventNewBlockHeader. It starts a goroutine to subscribe to blockchain new block event and update the cached height.
func NewChainHeight ¶
func NewChainHeight( ctx context.Context, rpcClient tmrpcclient.Client, logger zerolog.Logger, ) (*ChainHeight, error)
NewChainHeight returns a new ChainHeight struct that starts a new goroutine subscribed to EventNewBlockHeader.
func (*ChainHeight) GetChainHeight ¶
func (chainHeight *ChainHeight) GetChainHeight() (int64, error)
GetChainHeight returns the last chain height available.
type PriceStore ¶
type PriceStore struct {
// contains filtered or unexported fields
}
func NewPriceStore ¶
func NewPriceStore() *PriceStore