account

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2018 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const TransferSizeLimit = 32 * 1024

TransferSizeLimit is the maximum size of transfer allowed

Variables

This section is empty.

Functions

func LoadAccountState

func LoadAccountState(ws state.WorkingSet, addrHash hash.PKHash) (*state.Account, error)

LoadAccountState loads an account state

func LoadOrCreateAccountState

func LoadOrCreateAccountState(ws state.WorkingSet, addr string, init *big.Int) (*state.Account, error)

LoadOrCreateAccountState either loads an account state or creates an account state

func SetNonce

func SetNonce(act action.Action, state *state.Account)

SetNonce sets nonce for account

func StoreState

func StoreState(ws state.WorkingSet, addr string, state state.State) error

StoreState put updated 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(_ 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