Documentation ¶
Index ¶
- func NewAccountCreator() state.AccountFactory
- func NewAccountFactoryCreator(accountType Type) (state.AccountFactory, error)
- func NewMetaAccountCreator() state.AccountFactory
- func NewPeerAccountCreator() state.AccountFactory
- type AccountCreator
- type MetaAccountCreator
- type PeerAccountCreator
- type Type
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewAccountCreator ¶
func NewAccountCreator() state.AccountFactory
NewAccountCreator creates an account creator
func NewAccountFactoryCreator ¶ added in v1.0.3
func NewAccountFactoryCreator(accountType Type) (state.AccountFactory, error)
NewAccountFactoryCreator returns an account factory depending on shard coordinator self id
func NewMetaAccountCreator ¶ added in v1.0.3
func NewMetaAccountCreator() state.AccountFactory
NewMetaAccountCreator creates a meta account creator
func NewPeerAccountCreator ¶
func NewPeerAccountCreator() state.AccountFactory
NewPeerAccountCreator creates a peer account creator
Types ¶
type AccountCreator ¶
type AccountCreator struct { }
AccountCreator has method to create a new account
func (*AccountCreator) CreateAccount ¶
func (c *AccountCreator) CreateAccount(address state.AddressContainer, tracker state.AccountTracker) (state.AccountHandler, error)
CreateAccount calls the new Account creator and returns the result
func (*AccountCreator) IsInterfaceNil ¶
func (c *AccountCreator) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
type MetaAccountCreator ¶ added in v1.0.3
type MetaAccountCreator struct { }
MetaAccountCreator has a method to create a new meta accound
func (*MetaAccountCreator) CreateAccount ¶ added in v1.0.3
func (c *MetaAccountCreator) CreateAccount(address state.AddressContainer, tracker state.AccountTracker) (state.AccountHandler, error)
CreateAccount calls the new Account creator and returns the result
func (*MetaAccountCreator) IsInterfaceNil ¶ added in v1.0.16
func (c *MetaAccountCreator) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
type PeerAccountCreator ¶
type PeerAccountCreator struct { }
PeerAccountCreator has a method to create a new peer account
func (*PeerAccountCreator) CreateAccount ¶
func (c *PeerAccountCreator) CreateAccount(address state.AddressContainer, tracker state.AccountTracker) (state.AccountHandler, error)
CreateAccount calls the new Account creator and returns the result
func (*PeerAccountCreator) IsInterfaceNil ¶
func (c *PeerAccountCreator) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
type Type ¶ added in v1.0.20
type Type uint8
Type defines account types to save in accounts trie
const ( // UserAccount identifies an account holding balance, storage updates, code UserAccount Type = 0 // ShardStatistics identifies a shard, keeps the statistics ShardStatistics Type = 1 // ValidatorAccount identifies an account holding stake, crypto public keys, assigned shard, rating ValidatorAccount Type = 2 )