Documentation ¶
Index ¶
- type DelegationAmount
- type DelegationState
- type DelegationStore
- func (st *DelegationStore) AddToAddress(validatorAddress keys.Address, delegatorAddress keys.Address, ...) error
- func (st *DelegationStore) DumpState(options *Options) (state *DelegationState, succeed bool)
- func (st *DelegationStore) Get(key []byte) (amt *balance.Amount, err error)
- func (st *DelegationStore) GetDelegatorBoundedAmount(delegatorAddress keys.Address) (amount *balance.Amount, err error)
- func (st *DelegationStore) GetDelegatorEffectiveAmount(delegatorAddress keys.Address) (amount *balance.Amount, err error)
- func (st *DelegationStore) GetMatureAmounts(version int64) (mature *MatureBlock, err error)
- func (st *DelegationStore) GetMaturedPendingAmount(delegatorAddress keys.Address, version int64, count int64) []*MatureData
- func (st *DelegationStore) GetValidatorAmount(validatorAddress keys.Address) (amount *balance.Amount, err error)
- func (st *DelegationStore) GetValidatorDelegationAmount(validatorAddress keys.Address, delegatorAddress keys.Address) (amount *balance.Amount, err error)
- func (st *DelegationStore) LoadState(state DelegationState) (succeed bool)
- func (st *DelegationStore) MinusFromAddress(validatorAddress keys.Address, delegatorAddress keys.Address, ...) error
- func (st *DelegationStore) Set(key []byte, amt *balance.Amount) error
- func (st *DelegationStore) SetDelegatorBoundedAmount(delegatorAddress keys.Address, amt balance.Amount) (err error)
- func (st *DelegationStore) SetDelegatorEffectiveAmount(delegatorAddress keys.Address, amt balance.Amount) (err error)
- func (st *DelegationStore) SetMatureAmounts(version int64, mature *MatureBlock) (err error)
- func (st *DelegationStore) SetValidatorAmount(validatorAddress keys.Address, amt balance.Amount) (err error)
- func (st *DelegationStore) SetValidatorDelegationAmount(validatorAddress keys.Address, delegatorAddress keys.Address, ...) (err error)
- func (st *DelegationStore) Stake(validatorAddress keys.Address, delegatorAddress keys.Address, ...) error
- func (st *DelegationStore) Unstake(validatorAddress keys.Address, delegatorAddress keys.Address, ...) error
- func (st *DelegationStore) UpdateWithdrawReward(height int64)
- func (st *DelegationStore) WithState(state *storage.State) *DelegationStore
- func (st *DelegationStore) Withdraw(validatorAddress keys.Address, delegatorAddress keys.Address, ...) error
- type MatureBlock
- type MatureData
- type Options
- type ValidatorDelegationAmount
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DelegationAmount ¶ added in v0.14.4
type DelegationAmount struct { Address keys.Address `json:"address"` Amount *balance.Amount `json:"amount"` }
-----------------------------Dump/Load chain state
type DelegationState ¶ added in v0.14.4
type DelegationState struct { ValidatorAmounts []*DelegationAmount `json:"validatorAmounts"` ValidatorDelegationAmounts []*ValidatorDelegationAmount `json:"validatorDelegationAmounts"` DelegatorEffectiveAmounts []*DelegationAmount `json:"delegatorEffectiveAmounts"` DelegatorBoundedAmounts []*DelegationAmount `json:"delegatorBoundedAmounts"` MatureAmounts []*MatureData `json:"matureAmounts"` }
func NewDelegationState ¶ added in v0.14.4
func NewDelegationState() *DelegationState
type DelegationStore ¶
type DelegationStore struct {
// contains filtered or unexported fields
}
func NewDelegationStore ¶
func NewDelegationStore(prefix string, state *storage.State) *DelegationStore
func (*DelegationStore) AddToAddress ¶ added in v0.16.1
func (*DelegationStore) DumpState ¶ added in v0.14.4
func (st *DelegationStore) DumpState(options *Options) (state *DelegationState, succeed bool)
func (*DelegationStore) Get ¶
func (st *DelegationStore) Get(key []byte) (amt *balance.Amount, err error)
func (*DelegationStore) GetDelegatorBoundedAmount ¶
func (*DelegationStore) GetDelegatorEffectiveAmount ¶
func (*DelegationStore) GetMatureAmounts ¶
func (st *DelegationStore) GetMatureAmounts(version int64) (mature *MatureBlock, err error)
func (*DelegationStore) GetMaturedPendingAmount ¶
func (st *DelegationStore) GetMaturedPendingAmount(delegatorAddress keys.Address, version int64, count int64) []*MatureData
func (*DelegationStore) GetValidatorAmount ¶
func (*DelegationStore) GetValidatorDelegationAmount ¶
func (*DelegationStore) LoadState ¶ added in v0.14.4
func (st *DelegationStore) LoadState(state DelegationState) (succeed bool)
func (*DelegationStore) MinusFromAddress ¶ added in v0.16.1
func (*DelegationStore) SetDelegatorBoundedAmount ¶
func (*DelegationStore) SetDelegatorEffectiveAmount ¶
func (*DelegationStore) SetMatureAmounts ¶
func (st *DelegationStore) SetMatureAmounts(version int64, mature *MatureBlock) (err error)
func (*DelegationStore) SetValidatorAmount ¶
func (*DelegationStore) SetValidatorDelegationAmount ¶
func (*DelegationStore) UpdateWithdrawReward ¶
func (st *DelegationStore) UpdateWithdrawReward(height int64)
func (*DelegationStore) WithState ¶
func (st *DelegationStore) WithState(state *storage.State) *DelegationStore
type MatureBlock ¶
type MatureBlock struct { Height int64 Data []*MatureData }
type MatureData ¶
Click to show internal directories.
Click to hide internal directories.