statemanager call function will return call information even if call errors
This commit is contained in:
parent
2395de4bb3
commit
ec5358773e
@ -133,9 +133,7 @@ func (sm *StateManager) Call(ctx context.Context, msg *types.Message, ts *types.
|
||||
|
||||
// TODO: maybe just use the invoker directly?
|
||||
ret, err := vmi.ApplyImplicitMessage(ctx, msg)
|
||||
if err != nil {
|
||||
return nil, xerrors.Errorf("apply message failed: %w", err)
|
||||
}
|
||||
// Don't check for error here, we want to bubble it up, but also return ret as an InvocResult
|
||||
|
||||
var errs string
|
||||
if ret.ActorErr != nil {
|
||||
@ -150,8 +148,7 @@ func (sm *StateManager) Call(ctx context.Context, msg *types.Message, ts *types.
|
||||
ExecutionTrace: ret.ExecutionTrace,
|
||||
Error: errs,
|
||||
Duration: ret.Duration,
|
||||
}, nil
|
||||
|
||||
}, err
|
||||
}
|
||||
|
||||
func (sm *StateManager) CallWithGas(ctx context.Context, msg *types.Message, priorMsgs []types.ChainMsg, ts *types.TipSet) (*api.InvocResult, error) {
|
||||
|
Loading…
Reference in New Issue
Block a user