factory

package
v1.0.67 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 30, 2019 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

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

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

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
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL