eco

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2019 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecrAccountQOS

func DecrAccountQOS(ctx context.Context, addr btypes.Address, amount btypes.BigInt) error

func IncrAccountQOS

func IncrAccountQOS(ctx context.Context, addr btypes.Address, amount btypes.BigInt) error

func RegisterCodec

func RegisterCodec(cdc *amino.Codec)

Types

type Eco

type Eco struct {
	Context            context.Context
	DistributionMapper *mapper.DistributionMapper
	DelegationMapper   *mapper.DelegationMapper
	ValidatorMapper    *mapper.ValidatorMapper
	VoteInfoMapper     *mapper.VoteInfoMapper
}

func GetEco

func GetEco(ctx context.Context) Eco

func (Eco) DelegateValidator

func (e Eco) DelegateValidator(validator types.Validator, delegatorAddr btypes.Address, delegateAmount uint64, isCompound bool, needMinusAccountQOS bool) error

func (Eco) RemoveValidator

func (e Eco) RemoveValidator(valAddr btypes.Address) error

删除和validator相关的eco数据 CONTRACT: delegator当前收益和收益发放信息数据不删除, 只是将bondTokens重置为0 发放收益时,若delegator非validator的委托人, 或validator 不存在 则可以将delegator的收益相关数据删除 发放收益时,validator的汇总数据可能会不存在

func (Eco) UnbondValidator

func (e Eco) UnbondValidator(validator types.Validator, delegatorAddr btypes.Address, isUnbondAll bool, unbondAmount uint64, isRedelegate bool) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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