account

package
v0.4.4 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2019 License: Apache-2.0 Imports: 10 Imported by: 4

Documentation

Index

Constants

View Source
const TransferSizeLimit = 32 * 1024

TransferSizeLimit is the maximum size of transfer allowed

Variables

This section is empty.

Functions

func LoadAccount

func LoadAccount(sm protocol.StateManager, addrHash hash.PKHash) (*state.Account, error)

LoadAccount loads an account state

func LoadOrCreateAccount

func LoadOrCreateAccount(sm protocol.StateManager, encodedAddr string, init *big.Int) (*state.Account, error)

LoadOrCreateAccount either loads an account state or creates an account state

func SetNonce

func SetNonce(i noncer, state *state.Account)

SetNonce sets nonce for account

func StoreAccount

func StoreAccount(sm protocol.StateManager, encodedAddr string, acct *state.Account) error

StoreAccount puts updated account state to trie

Types

type Protocol

type Protocol struct{}

Protocol defines the protocol of handling account

func NewProtocol

func NewProtocol() *Protocol

NewProtocol instantiates the protocol of account

func (*Protocol) Handle

Handle handles an account

func (*Protocol) Validate

func (p *Protocol) Validate(ctx context.Context, act action.Action) error

Validate validates an account

Jump to

Keyboard shortcuts

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