Documentation ¶
Index ¶
- type IStateManager
- type Stmgr
- func (s *Stmgr) Call(ctx context.Context, msg *types.Message, ts *types.TipSet) (*vm.Ret, error)
- func (s *Stmgr) CallWithGas(ctx context.Context, msg *types.Message, priorMsgs []types.ChainMsg, ...) (*vm.Ret, error)
- func (s *Stmgr) Close(ctx context.Context)
- func (s *Stmgr) FlushChainHead() (*types.TipSet, error)
- func (s *Stmgr) GetActorAt(ctx context.Context, addr address.Address, ts *types.TipSet) (*types.Actor, error)
- func (s *Stmgr) GetActorAtTsk(ctx context.Context, addr address.Address, tsk types.TipSetKey) (*types.Actor, error)
- func (s *Stmgr) GetMarketState(ctx context.Context, ts *types.TipSet) (market.State, error)
- func (s *Stmgr) GetPaychState(ctx context.Context, addr address.Address, ts *types.TipSet) (*types.Actor, paych.State, error)
- func (s *Stmgr) ParentState(ctx context.Context, ts *types.TipSet) (*types.TipSet, *tree.State, error)
- func (s *Stmgr) ParentStateTsk(ctx context.Context, tsk types.TipSetKey) (*types.TipSet, *tree.State, error)
- func (s *Stmgr) ParentStateView(ctx context.Context, ts *types.TipSet) (*types.TipSet, *appstate.View, error)
- func (s *Stmgr) ParentStateViewTsk(ctx context.Context, tsk types.TipSetKey) (*types.TipSet, *appstate.View, error)
- func (s *Stmgr) ResolveToKeyAddress(ctx context.Context, addr address.Address, ts *types.TipSet) (address.Address, error)
- func (s *Stmgr) Rollback(ctx context.Context, pts, cts *types.TipSet) error
- func (s *Stmgr) RunStateTransition(ctx context.Context, ts *types.TipSet) (root cid.Cid, receipts cid.Cid, err error)
- func (s *Stmgr) RunStateTransitionV2(ctx context.Context, ts *types.TipSet) (cid.Cid, cid.Cid, error)
- func (s *Stmgr) StateView(ctx context.Context, ts *types.TipSet) (cid.Cid, *appstate.View, error)
- func (s *Stmgr) StateViewTsk(ctx context.Context, tsk types.TipSetKey) (*types.TipSet, cid.Cid, *appstate.View, error)
- func (s *Stmgr) TipsetState(ctx context.Context, ts *types.TipSet) (*tree.State, error)
- func (s *Stmgr) TipsetStateTsk(ctx context.Context, tsk types.TipSetKey) (*types.TipSet, *tree.State, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IStateManager ¶
type IStateManager interface { ResolveToKeyAddress(ctx context.Context, addr address.Address, ts *types.TipSet) (address.Address, error) GetPaychState(ctx context.Context, addr address.Address, ts *types.TipSet) (*types.Actor, paych.State, error) Call(ctx context.Context, msg *types.Message, ts *types.TipSet) (*vm.Ret, error) GetMarketState(ctx context.Context, ts *types.TipSet) (market.State, error) }
stateManagerAPI defines the methods needed from StateManager todo remove this code and add private interface in market and paychanel package
type Stmgr ¶ added in v1.2.0
type Stmgr struct {
// contains filtered or unexported fields
}
func NewStateManger ¶ added in v1.2.0
func NewStateManger(cs *chain.Store, cp consensus.StateTransformer, rnd consensus.ChainRandomness, fork fork.IFork, gasSchedule *gas.PricesSchedule, syscallsImpl vm.SyscallsImpl) *Stmgr
func (*Stmgr) Call ¶ added in v1.2.0
Call used for api invoke to compute a msg base on specify tipset, if the tipset is null, use latest tipset in db
func (*Stmgr) CallWithGas ¶ added in v1.2.0
func (s *Stmgr) CallWithGas(ctx context.Context, msg *types.Message, priorMsgs []types.ChainMsg, ts *types.TipSet) (*vm.Ret, error)
CallWithGas used to estimate message gaslimit, for each incoming message ,should execute after priorMsg in mpool
func (*Stmgr) FlushChainHead ¶ added in v1.2.0
func (*Stmgr) GetActorAt ¶ added in v1.2.0
func (*Stmgr) GetActorAtTsk ¶ added in v1.2.0
func (s *Stmgr) GetActorAtTsk(ctx context.Context, addr address.Address, tsk types.TipSetKey) (*types.Actor, error)
ctx context.Context, ts *types.TipSet, addr address.Address
func (*Stmgr) GetMarketState ¶ added in v1.2.0
func (*Stmgr) GetPaychState ¶ added in v1.2.0
func (*Stmgr) ParentState ¶ added in v1.2.0
func (*Stmgr) ParentStateTsk ¶ added in v1.2.0
func (*Stmgr) ParentStateView ¶ added in v1.2.0
func (*Stmgr) ParentStateViewTsk ¶ added in v1.2.0
func (*Stmgr) ResolveToKeyAddress ¶ added in v1.2.0
func (*Stmgr) RunStateTransition ¶ added in v1.2.0
func (*Stmgr) RunStateTransitionV2 ¶ added in v1.2.0
func (s *Stmgr) RunStateTransitionV2(ctx context.Context, ts *types.TipSet) (cid.Cid, cid.Cid, error)
deprecated: in future use.
func (*Stmgr) StateViewTsk ¶ added in v1.2.0
func (*Stmgr) TipsetState ¶ added in v1.2.0
Click to show internal directories.
Click to hide internal directories.