Documentation ¶
Index ¶
- Constants
- func NewDBProxy(name, dir string) (tmdb.DB, error)
- type IncentiveInfo
- type Store
- func (s Store) AddIncentiveRecord(height int64, address crypto.Address, amount *types.Currency) error
- func (s Store) DeleteParcel(parcelID []byte)
- func (s Store) DeleteRequest(buyer crypto.Address, parcelID []byte)
- func (s Store) DeleteUsage(buyer crypto.Address, parcelID []byte)
- func (s Store) GetAddressIncentiveRecords(address crypto.Address) []IncentiveInfo
- func (s Store) GetBalance(addr tm.Address, committed bool) *types.Currency
- func (s Store) GetBlockIncentiveRecords(height int64) []IncentiveInfo
- func (s Store) GetDelegate(holder crypto.Address, committed bool) *types.Delegate
- func (s Store) GetDelegateEx(holder crypto.Address, committed bool) *types.DelegateEx
- func (s Store) GetDelegatesByDelegatee(delegatee crypto.Address, committed bool) []*types.DelegateEx
- func (s Store) GetEffStake(delegatee crypto.Address, committed bool) *types.Stake
- func (s Store) GetHolderByValidator(addr crypto.Address, committed bool) []byte
- func (s Store) GetIncentiveRecord(height int64, address crypto.Address) IncentiveInfo
- func (s Store) GetLockedStake(holder crypto.Address, height int64, committed bool) *types.Stake
- func (s Store) GetLockedStakes(holder crypto.Address, committed bool) []*types.Stake
- func (s Store) GetParcel(parcelID []byte, committed bool) *types.ParcelValue
- func (s Store) GetRequest(buyer crypto.Address, parcelID []byte, committed bool) *types.RequestValue
- func (s Store) GetStake(holder crypto.Address, committed bool) *types.Stake
- func (s Store) GetStakeByValidator(addr crypto.Address, committed bool) *types.Stake
- func (s Store) GetTopStakes(max uint64, committed bool) []*types.Stake
- func (s Store) GetUnlockedStake(holder crypto.Address, committed bool) *types.Stake
- func (s Store) GetUsage(buyer crypto.Address, parcelID []byte, committed bool) *types.UsageValue
- func (s Store) GetValidators(max uint64, committed bool) abci.ValidatorUpdates
- func (s Store) LoosenLockedStakes(committed bool)
- func (s Store) Purge() error
- func (s Store) Root() []byte
- func (s Store) Save() ([]byte, int64, error)
- func (s Store) SetBalance(addr tm.Address, balance *types.Currency) error
- func (s Store) SetBalanceUint64(addr tm.Address, balance uint64) error
- func (s Store) SetDelegate(holder crypto.Address, delegate *types.Delegate) error
- func (s Store) SetLockedStake(holder crypto.Address, stake *types.Stake, height int64) error
- func (s Store) SetParcel(parcelID []byte, value *types.ParcelValue) error
- func (s Store) SetRequest(buyer crypto.Address, parcelID []byte, value *types.RequestValue) error
- func (s Store) SetUnlockedStake(holder crypto.Address, stake *types.Stake) error
- func (s Store) SetUsage(buyer crypto.Address, parcelID []byte, value *types.UsageValue) error
- func (s Store) UnlockStakes(holder crypto.Address, height int64, committed bool)
- func (s Store) Verify(key []byte) (bool, error)
Constants ¶
View Source
const ( // division by 2 is for safeguarding. tendermint code is not so safe. MaxTotalVotingPower = tm.MaxTotalVotingPower / 2 )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type IncentiveInfo ¶ added in v1.2.0
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
func (Store) AddIncentiveRecord ¶ added in v1.2.0
func (Store) DeleteParcel ¶
func (Store) GetAddressIncentiveRecords ¶ added in v1.2.0
func (s Store) GetAddressIncentiveRecords(address crypto.Address) []IncentiveInfo
func (Store) GetBalance ¶
func (Store) GetBlockIncentiveRecords ¶ added in v1.2.0
func (s Store) GetBlockIncentiveRecords(height int64) []IncentiveInfo
func (Store) GetDelegate ¶
func (Store) GetDelegateEx ¶ added in v1.1.0
func (Store) GetDelegatesByDelegatee ¶ added in v1.1.0
func (Store) GetEffStake ¶
func (Store) GetHolderByValidator ¶
func (Store) GetIncentiveRecord ¶ added in v1.2.0
func (s Store) GetIncentiveRecord(height int64, address crypto.Address) IncentiveInfo
func (Store) GetLockedStake ¶ added in v1.2.0
func (Store) GetLockedStakes ¶ added in v1.2.0
func (Store) GetParcel ¶
func (s Store) GetParcel(parcelID []byte, committed bool) *types.ParcelValue
func (Store) GetRequest ¶
func (Store) GetStakeByValidator ¶
func (Store) GetUnlockedStake ¶ added in v1.2.0
func (Store) GetValidators ¶
func (s Store) GetValidators(max uint64, committed bool) abci.ValidatorUpdates
func (Store) LoosenLockedStakes ¶ added in v1.2.0
func (Store) SetBalanceUint64 ¶
func (Store) SetDelegate ¶
Update data on stateDB, indexDelegator, indexEffStake
func (Store) SetLockedStake ¶ added in v1.2.0
SetLockedStake stores a stake locked at *height*. The stake's height is decremented each time when LoosenLockedStakes is called.
func (Store) SetRequest ¶
func (Store) SetUnlockedStake ¶ added in v1.2.0
func (Store) UnlockStakes ¶ added in v1.2.0
Click to show internal directories.
Click to hide internal directories.