Keep the context consistent
This commit is contained in:
parent
3e22712f2d
commit
dd439e0af8
@ -437,14 +437,14 @@ func (sm *StateManager) tipsetExecutedMessage(ts *types.TipSet, msg cid.Cid) (*t
|
||||
|
||||
func (sm *StateManager) ListAllActors(ctx context.Context, ts *types.TipSet) ([]address.Address, error) {
|
||||
if ts == nil {
|
||||
ts = sm.ChainStore().GetHeaviestTipSet()
|
||||
ts = sm.cs.GetHeaviestTipSet()
|
||||
}
|
||||
st, _, err := sm.TipSetState(ctx, ts)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
cst := hamt.CSTFromBstore(sm.ChainStore().Blockstore())
|
||||
cst := hamt.CSTFromBstore(sm.cs.Blockstore())
|
||||
r, err := hamt.LoadNode(ctx, cst, st)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@ -471,7 +471,7 @@ func (sm *StateManager) MarketBalance(ctx context.Context, addr address.Address,
|
||||
if _, err := sm.LoadActorState(ctx, actors.StorageMarketAddress, &state, ts); err != nil {
|
||||
return actors.StorageParticipantBalance{}, err
|
||||
}
|
||||
cst := hamt.CSTFromBstore(sm.ChainStore().Blockstore())
|
||||
cst := hamt.CSTFromBstore(sm.cs.Blockstore())
|
||||
b, _, err := actors.GetMarketBalances(ctx, cst, state.Balances, addr)
|
||||
if err != nil {
|
||||
return actors.StorageParticipantBalance{}, err
|
||||
|
Loading…
Reference in New Issue
Block a user