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) }
Click to show internal directories.
Click to hide internal directories.