remove final WithStateTree
This commit is contained in:
parent
6bf7976add
commit
4cd92d8576
@ -47,13 +47,15 @@ func (mpp *mpoolProvider) PubSubPublish(k string, v []byte) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (mpp *mpoolProvider) GetActorAfter(addr address.Address, ts *types.TipSet) (*types.Actor, error) {
|
func (mpp *mpoolProvider) GetActorAfter(addr address.Address, ts *types.TipSet) (*types.Actor, error) {
|
||||||
var act types.Actor
|
|
||||||
stcid, _, err := mpp.sm.TipSetState(context.TODO(), ts)
|
stcid, _, err := mpp.sm.TipSetState(context.TODO(), ts)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, xerrors.Errorf("computing tipset state for GetActor: %w", err)
|
return nil, xerrors.Errorf("computing tipset state for GetActor: %w", err)
|
||||||
}
|
}
|
||||||
version := mpp.sm.GetNtwkVersion(context.TODO(), ts.Height())
|
st, err := mpp.sm.StateTree(stcid)
|
||||||
return &act, mpp.sm.WithStateTree(stcid, version, mpp.sm.WithActor(addr, stmgr.GetActor(&act)))
|
if err != nil {
|
||||||
|
return nil, xerrors.Errorf("failed to load state tree: %w", err)
|
||||||
|
}
|
||||||
|
return st.GetActor(addr)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (mpp *mpoolProvider) StateAccountKey(ctx context.Context, addr address.Address, ts *types.TipSet) (address.Address, error) {
|
func (mpp *mpoolProvider) StateAccountKey(ctx context.Context, addr address.Address, ts *types.TipSet) (address.Address, error) {
|
||||||
|
Loading…
Reference in New Issue
Block a user