Documentation ¶
Index ¶
- func CheckStateInvariants(tree *Tree, expectedBalanceTotal abi.TokenAmount) (*builtin.MessageAccumulator, error)
- func MinerEligibleForElection(store adt.Store, mstate *miner.State, pstate *power.State, maddr addr.Address, ...) (bool, error)
- func MinerPoStLookbackEligibleForElection(store adt.Store, pstate *power.State, mAddr addr.Address) (bool, error)
- type Actor
- type Tree
- func (t *Tree) Flush() (cid.Cid, error)
- func (t *Tree) ForEach(fn func(addr address.Address, actor *Actor) error) error
- func (t *Tree) ForEachKey(fn func(addr address.Address) error) error
- func (t *Tree) GetActor(addr address.Address) (*Actor, bool, error)
- func (t *Tree) SetActor(addr address.Address, actor *Actor) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckStateInvariants ¶
func CheckStateInvariants(tree *Tree, expectedBalanceTotal abi.TokenAmount) (*builtin.MessageAccumulator, error)
func MinerEligibleForElection ¶
func MinerEligibleForElection(store adt.Store, mstate *miner.State, pstate *power.State, maddr addr.Address, currEpoch abi.ChainEpoch) (bool, error)
Tests whether a miner is eligible to win an election given the immediately prior state of the miner and system actors.
func MinerPoStLookbackEligibleForElection ¶
func MinerPoStLookbackEligibleForElection(store adt.Store, pstate *power.State, mAddr addr.Address) (bool, error)
Tests whether a miner is eligible for election given a Winning PoSt lookback state. The power state must be the state of the power actor at Winning PoSt lookback epoch.
Types ¶
type Actor ¶
Value type of the top level of the state tree. Represents the on-chain state of a single actor.
type Actor struct { Code cid.Cid // CID representing the code associated with the actor Head cid.Cid // CID of the head state object for the actor CallSeqNum uint64 // CallSeqNum for the next message to be received by the actor (non-zero for accounts only) Balance big.Int // Token balance of the actor }
type Tree ¶
A specialization of a map of ID-addresses to actor heads.
func (*Tree) ForEachKey ¶
Traverses all keys in the tree, without decoding the actor states.
Click to show internal directories.
Click to hide internal directories.