Skip to content

Commit

Permalink
Merge pull request #8734 from filecoin-project/asr/implicit-fail
Browse files Browse the repository at this point in the history
fvm: fail if implicit message fails
  • Loading branch information
arajasek authored May 27, 2022
2 parents c5b5a99 + 7ea661b commit 40d75d1
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions chain/vm/fvm.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package vm
import (
"bytes"
"context"
"fmt"
"os"
"time"

Expand Down Expand Up @@ -413,12 +414,18 @@ func (vm *FVM) ApplyImplicitMessage(ctx context.Context, cmsg *types.Message) (*
}
}

return &ApplyRet{
applyRet := &ApplyRet{
MessageReceipt: receipt,
ActorErr: aerr,
ExecutionTrace: et,
Duration: duration,
}, nil
}

if ret.ExitCode != 0 {
return applyRet, fmt.Errorf("implicit message failed with exit code: %d and error: %w", ret.ExitCode, applyRet.ActorErr)
}

return applyRet, nil
}

func (vm *FVM) Flush(ctx context.Context) (cid.Cid, error) {
Expand Down

0 comments on commit 40d75d1

Please # to comment.