nv3

package
v0.9.15 Latest Latest
Warning

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

Go to latest
Published: May 14, 2022 License: Apache-2.0, MIT Imports: 12 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckStateTree

func CheckStateTree(ctx context.Context, store cbor.IpldStore, root cid.Cid, priorEpoch abi.ChainEpoch, expectedBalanceTotal abi.TokenAmount) error

Checks that a state tree is internally consistent. This performs only very basic checks. Versions in v2 will be much more thorough.

func MigrateStateTree

func MigrateStateTree(ctx context.Context, store cbor.IpldStore, root cid.Cid, priorEpoch abi.ChainEpoch) (cid.Cid, error)

Loads and migrates the Filecoin state tree from a root, writing the new state tree blocks into the same store. Returns the new root of the state tree.

Types

type StateMigration

type StateMigration interface {
	// Loads an actor's state from an input store at `head` and writes new state to an output store.
	// The migration is assumed to be running after the end of `priorEpoch` (the epoch can affect the migration logic).
	// The actor's address is `addr` and the state `tree` provides access to other actor states.
	// Returns the new state head CID.
	MigrateState(ctx context.Context, store cbor.IpldStore, head cid.Cid, priorEpoch abi.ChainEpoch, addr address.Address, tree *states.Tree) (newHead cid.Cid, err error)
}

Jump to

Keyboard shortcuts

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