Documentation ¶
Index ¶
- type Cache
- func (c *Cache) AddToPool(val *validator.Validator) error
- func (c *Cache) AddToSet(val *validator.Validator) error
- func (c *Cache) Flush(set *validator.ValidatorSet) error
- func (c *Cache) GetAccount(addr crypto.Address) (*account.Account, error)
- func (c *Cache) GetStorage(addr crypto.Address, key binary.Word256) (binary.Word256, error)
- func (c *Cache) GetValidator(addr crypto.Address) (*validator.Validator, error)
- func (c *Cache) HasAccount(addr crypto.Address) bool
- func (c *Cache) HasPermissions(acc *account.Account, perm account.Permissions) bool
- func (c *Cache) HasValidator(addr crypto.Address) bool
- func (c *Cache) RemoveAccount(addr crypto.Address) error
- func (c *Cache) RemoveFromPool(val *validator.Validator) error
- func (c *Cache) Reset()
- func (c *Cache) SetStorage(addr crypto.Address, key, value binary.Word256) error
- func (c *Cache) UpdateAccount(acc *account.Account) error
- func (c *Cache) UpdateValidator(val *validator.Validator) error
- type CacheOption
- type State
- func (st *State) AccountCount() int
- func (st *State) ByzantineValidator(addr crypto.Address) error
- func (st *State) GetAccount(addr crypto.Address) (*account.Account, error)
- func (st *State) GetStorage(addr crypto.Address, key binary.Word256) (binary.Word256, error)
- func (st *State) GetValidator(addr crypto.Address) (*validator.Validator, error)
- func (st *State) GlobalAccount() *account.Account
- func (st *State) HasAccount(addr crypto.Address) bool
- func (st *State) HasBondPermission(acc *account.Account) bool
- func (st *State) HasCallPermission(acc *account.Account) bool
- func (st *State) HasCreateAccountPermission(acc *account.Account) bool
- func (st *State) HasCreateContractPermission(acc *account.Account) bool
- func (st *State) HasModifyPermission(acc *account.Account) bool
- func (st *State) HasPermissions(acc *account.Account, perm account.Permissions) bool
- func (st *State) HasSendPermission(acc *account.Account) bool
- func (st *State) HasValidator(addr crypto.Address) bool
- func (st *State) IncentivizeValidator(addr crypto.Address, fee uint64) error
- func (st *State) IterateAccounts(consumer func(*account.Account) (stop bool)) (stopped bool, err error)
- func (st *State) IterateStorage(addr crypto.Address, consumer func(key, value binary.Word256) (stop bool)) (stopped bool, err error)
- func (st *State) IterateValidators(consumer func(*validator.Validator) (stop bool)) (stopped bool, err error)
- func (st *State) SaveState() ([]byte, error)
- func (st *State) UpdateGenesisState(gen *proposal.Genesis) error
- func (st *State) ValidatorCount() int
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
func (*Cache) GetAccount ¶
func (*Cache) GetStorage ¶
func (*Cache) GetValidator ¶
func (*Cache) HasPermissions ¶
func (*Cache) RemoveAccount ¶ added in v0.5.0
func (*Cache) SetStorage ¶
type CacheOption ¶
type CacheOption func(*Cache)
type State ¶
func LoadState ¶
LoadState tries to load the execution state from DB, returns nil with no error if no state found
func (*State) AccountCount ¶
func (*State) GetAccount ¶
func (*State) GetStorage ¶
func (*State) GetValidator ¶
func (*State) GlobalAccount ¶
func (*State) HasCreateAccountPermission ¶
func (*State) HasCreateContractPermission ¶
func (*State) HasPermissions ¶
HasPermissions ensures that an account has required permissions
func (*State) IncentivizeValidator ¶
func (*State) IterateAccounts ¶
func (*State) IterateStorage ¶
func (*State) IterateValidators ¶
func (*State) UpdateGenesisState ¶
UpdateGenesisState updates state at genesis time
func (*State) ValidatorCount ¶
Click to show internal directories.
Click to hide internal directories.