state

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2020 License: Apache-2.0, MIT Imports: 13 Imported by: 22

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AdtStore added in v0.3.0

type AdtStore struct{ cbor.IpldStore }

func (*AdtStore) Context added in v0.3.0

func (a *AdtStore) Context() context.Context

type StateTree

type StateTree struct {
	Store cbor.IpldStore
	// contains filtered or unexported fields
}

StateTree stores actors state by their ID.

func LoadStateTree

func LoadStateTree(cst cbor.IpldStore, c cid.Cid) (*StateTree, error)

func NewStateTree

func NewStateTree(cst cbor.IpldStore) (*StateTree, error)

func (*StateTree) ClearSnapshot added in v0.3.0

func (st *StateTree) ClearSnapshot()

func (*StateTree) DeleteActor added in v0.3.0

func (st *StateTree) DeleteActor(addr address.Address) error

func (*StateTree) Flush

func (st *StateTree) Flush(ctx context.Context) (cid.Cid, error)

func (*StateTree) GetActor

func (st *StateTree) GetActor(addr address.Address) (*types.Actor, error)

GetActor returns the actor from any type of `addr` provided.

func (*StateTree) LookupID

func (st *StateTree) LookupID(addr address.Address) (address.Address, error)

LookupID gets the ID address of this actor's `addr` stored in the `InitActor`.

func (*StateTree) MutateActor

func (st *StateTree) MutateActor(addr address.Address, f func(*types.Actor) error) error

func (*StateTree) RegisterNewAddress

func (st *StateTree) RegisterNewAddress(addr address.Address) (address.Address, error)

func (*StateTree) Revert

func (st *StateTree) Revert() error

func (*StateTree) SetActor

func (st *StateTree) SetActor(addr address.Address, act *types.Actor) error

func (*StateTree) Snapshot

func (st *StateTree) Snapshot(ctx context.Context) error

Jump to

Keyboard shortcuts

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