From 7b556252db0597a3737a24216d495addc47b842d Mon Sep 17 00:00:00 2001 From: Aayush Rajasekaran Date: Tue, 6 Oct 2020 05:34:53 -0400 Subject: [PATCH] Use SysErrReserved1 in the event of an actors panic --- chain/vm/runtime.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/chain/vm/runtime.go b/chain/vm/runtime.go index 472017a0090..52b2dcd2ccb 100644 --- a/chain/vm/runtime.go +++ b/chain/vm/runtime.go @@ -122,7 +122,11 @@ func (rt *Runtime) shimCall(f func() interface{}) (rval []byte, aerr aerrors.Act //log.Desugar().WithOptions(zap.AddStacktrace(zapcore.ErrorLevel)). //Sugar().Errorf("spec actors failure: %s", r) log.Errorf("spec actors failure: %s", r) - aerr = aerrors.Newf(1, "spec actors failure: %s", r) + if rt.NetworkVersion() <= network.Version3 { + aerr = aerrors.Newf(1, "spec actors failure: %s", r) + } else { + aerr = aerrors.Newf(exitcode.SysErrReserved1, "spec actors failure: %s", r) + } } }()