Documentation ¶
Index ¶
- func CheckDealStatesAgainstSectors(acc *builtin.MessageAccumulator, ...)
- func CheckMinersAgainstPower(acc *builtin.MessageAccumulator, ...)
- func CheckStateInvariants(tree *Tree, expectedBalanceTotal abi.TokenAmount, priorEpoch abi.ChainEpoch) (*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 CheckDealStatesAgainstSectors ¶
func CheckDealStatesAgainstSectors(acc *builtin.MessageAccumulator, minerSummaries map[addr.Address]*miner.StateSummary, marketSummary *market.StateSummary)
func CheckMinersAgainstPower ¶
func CheckMinersAgainstPower(acc *builtin.MessageAccumulator, minerSummaries map[addr.Address]*miner.StateSummary, powerSummary *power.StateSummary)
func CheckStateInvariants ¶
func CheckStateInvariants(tree *Tree, expectedBalanceTotal abi.TokenAmount, priorEpoch abi.ChainEpoch) (*builtin.MessageAccumulator, error)
Within this code, Go errors are not expected, but are often converted to messages so that execution can continue to find more errors rather than fail with no insight. Only errors thar are particularly troublesome to recover from should propagate as Go errors.
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.