Documentation ¶
Index ¶
- Constants
- type Candidate
- type Candidates
- func (c *Candidates) Count() int
- func (c *Candidates) Create(ownerAddress types.Address, rewardAddress types.Address, pubkey types.Pubkey, ...)
- func (c *Candidates) Exists(pubkey types.Pubkey) bool
- func (c *Candidates) Export(state *types.AppState, coinsMap map[types.CoinSymbol]types.Coin) map[types.Pubkey]uint32
- func (c *Candidates) GetCandidate(pubkey types.Pubkey) *Candidate
- func (c *Candidates) GetCandidateByTendermintAddress(address types.TmAddress) *Candidate
- func (c *Candidates) GetCandidateOwner(pubkey types.Pubkey) types.Address
- func (c *Candidates) GetCandidates() []*Candidate
- func (c *Candidates) GetNewCandidates(valCount int) []Candidate
- func (c *Candidates) GetStakeOfAddress(pubkey types.Pubkey, address types.Address, coin types.CoinSymbol) *Stake
- func (c *Candidates) GetStakeValueOfAddress(pubkey types.Pubkey, address types.Address, coin types.CoinSymbol) *big.Int
- func (c *Candidates) GetStakes(pubkey types.Pubkey) []*Stake
- func (c *Candidates) GetTotalStake(pubkey types.Pubkey) *big.Int
- func (c *Candidates) LoadCandidates()
- func (c *Candidates) LoadStakes()
- func (c *Candidates) LoadStakesOfCandidate(pubkey types.Pubkey)
- func (c *Candidates) SetTotalStake(pubkey types.Pubkey, stake *big.Int)
- func (c *Candidates) StakesCount(pubkey types.Pubkey) int
- type Stake
Constants ¶
View Source
const ( CandidateStatusOffline = 0x01 CandidateStatusOnline = 0x02 UnbondPeriod = 518400 MaxDelegatorsPerCandidate = 1000 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Candidate ¶
type Candidate struct { PubKey types.Pubkey RewardAddress types.Address OwnerAddress types.Address Commission uint32 Status byte // contains filtered or unexported fields }
func (*Candidate) FilterUpdates ¶
func (candidate *Candidate) FilterUpdates()
func (*Candidate) GetFilteredUpdates ¶
func (*Candidate) GetTmAddress ¶
func (*Candidate) GetTotalBipStake ¶
type Candidates ¶
type Candidates struct {
// contains filtered or unexported fields
}
func NewCandidates ¶
func (*Candidates) Count ¶
func (c *Candidates) Count() int
func (*Candidates) Export ¶
func (c *Candidates) Export(state *types.AppState, coinsMap map[types.CoinSymbol]types.Coin) map[types.Pubkey]uint32
func (*Candidates) GetCandidate ¶
func (c *Candidates) GetCandidate(pubkey types.Pubkey) *Candidate
func (*Candidates) GetCandidateByTendermintAddress ¶
func (c *Candidates) GetCandidateByTendermintAddress(address types.TmAddress) *Candidate
func (*Candidates) GetCandidateOwner ¶
func (c *Candidates) GetCandidateOwner(pubkey types.Pubkey) types.Address
func (*Candidates) GetCandidates ¶
func (c *Candidates) GetCandidates() []*Candidate
func (*Candidates) GetNewCandidates ¶
func (c *Candidates) GetNewCandidates(valCount int) []Candidate
func (*Candidates) GetStakeOfAddress ¶
func (c *Candidates) GetStakeOfAddress(pubkey types.Pubkey, address types.Address, coin types.CoinSymbol) *Stake
func (*Candidates) GetStakeValueOfAddress ¶
func (c *Candidates) GetStakeValueOfAddress(pubkey types.Pubkey, address types.Address, coin types.CoinSymbol) *big.Int
func (*Candidates) GetTotalStake ¶
func (c *Candidates) GetTotalStake(pubkey types.Pubkey) *big.Int
func (*Candidates) LoadCandidates ¶
func (c *Candidates) LoadCandidates()
func (*Candidates) LoadStakes ¶
func (c *Candidates) LoadStakes()
func (*Candidates) LoadStakesOfCandidate ¶
func (c *Candidates) LoadStakesOfCandidate(pubkey types.Pubkey)
func (*Candidates) SetTotalStake ¶
func (c *Candidates) SetTotalStake(pubkey types.Pubkey, stake *big.Int)
func (*Candidates) StakesCount ¶
func (c *Candidates) StakesCount(pubkey types.Pubkey) int
Click to show internal directories.
Click to hide internal directories.