Documentation ¶
Index ¶
- Constants
- type Bus
- type Candidate
- type Candidates
- func (c *Candidates) Commit() error
- func (c *Candidates) Count() int
- func (c *Candidates) Create(ownerAddress types.Address, rewardAddress types.Address, pubkey types.Pubkey, ...)
- func (c *Candidates) Delegate(address types.Address, pubkey types.Pubkey, coin types.CoinSymbol, ...)
- func (c *Candidates) DeleteCoin(pubkey types.Pubkey, coinSymbol types.CoinSymbol)
- func (c *Candidates) Edit(pubkey types.Pubkey, rewardAddress types.Address, ownerAddress types.Address)
- func (c *Candidates) Exists(pubkey types.Pubkey) bool
- func (c *Candidates) Export(state *types.AppState)
- 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, height int64) []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) IsDelegatorStakeSufficient(address types.Address, pubkey types.Pubkey, coin types.CoinSymbol, ...) bool
- func (c *Candidates) IsNewCandidateStakeSufficient(coin types.CoinSymbol, stake *big.Int) bool
- func (c *Candidates) Punish(height uint64, address types.TmAddress) *big.Int
- func (c *Candidates) PunishByzantineCandidate(height uint64, tmAddress types.TmAddress)
- func (c *Candidates) RecalculateStakes(height uint64)
- func (c *Candidates) SetOffline(pubkey types.Pubkey)
- func (c *Candidates) SetOnline(pubkey types.Pubkey)
- func (c *Candidates) SetStakes(pubkey types.Pubkey, stakes []types.Stake)
- func (c *Candidates) StakesCount(pubkey types.Pubkey) int
- func (c *Candidates) SubStake(address types.Address, pubkey types.Pubkey, coin types.CoinSymbol, ...)
- 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 Bus ¶
type Bus struct {
// contains filtered or unexported fields
}
func NewBus ¶
func NewBus(candidates *Candidates) *Bus
func (*Bus) DeleteCoin ¶
func (b *Bus) DeleteCoin(pubkey types.Pubkey, coin types.CoinSymbol)
type Candidate ¶
type Candidate struct { PubKey types.Pubkey RewardAddress types.Address OwnerAddress types.Address Commission uint Status byte // contains filtered or unexported fields }
func (*Candidate) GetFilteredUpdates ¶
func (*Candidate) GetTmAddress ¶
func (*Candidate) GetTotalBipStake ¶
func (*Candidate) SetStakeAtIndex ¶
type Candidates ¶
type Candidates struct {
// contains filtered or unexported fields
}
func NewCandidates ¶
func (*Candidates) Commit ¶
func (c *Candidates) Commit() error
func (*Candidates) Count ¶
func (c *Candidates) Count() int
func (*Candidates) DeleteCoin ¶
func (c *Candidates) DeleteCoin(pubkey types.Pubkey, coinSymbol types.CoinSymbol)
func (*Candidates) Export ¶
func (c *Candidates) Export(state *types.AppState)
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, height int64) []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) IsDelegatorStakeSufficient ¶
func (c *Candidates) IsDelegatorStakeSufficient(address types.Address, pubkey types.Pubkey, coin types.CoinSymbol, amount *big.Int) bool
func (*Candidates) IsNewCandidateStakeSufficient ¶
func (c *Candidates) IsNewCandidateStakeSufficient(coin types.CoinSymbol, stake *big.Int) bool
func (*Candidates) PunishByzantineCandidate ¶
func (c *Candidates) PunishByzantineCandidate(height uint64, tmAddress types.TmAddress)
func (*Candidates) RecalculateStakes ¶
func (c *Candidates) RecalculateStakes(height uint64)
func (*Candidates) SetOffline ¶
func (c *Candidates) SetOffline(pubkey types.Pubkey)
func (*Candidates) SetOnline ¶
func (c *Candidates) SetOnline(pubkey types.Pubkey)
func (*Candidates) SetStakes ¶
func (c *Candidates) SetStakes(pubkey types.Pubkey, stakes []types.Stake)
func (*Candidates) StakesCount ¶
func (c *Candidates) StakesCount(pubkey types.Pubkey) int
Click to show internal directories.
Click to hide internal directories.