Merge pull request #8889 from filecoin-project/asr/exec-trace

fix: fvm: make exectraces match legacyVM some more
This commit is contained in:
Aayush Rajasekaran 2022-06-22 13:45:39 -04:00 committed by GitHub
commit a80da7f1f9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -339,13 +339,14 @@ func (vm *FVM) ApplyMessage(ctx context.Context, cmsg types.ChainMsg) (*ApplyRet
return nil, xerrors.Errorf("failed to unmarshal exectrace: %w", err) return nil, xerrors.Errorf("failed to unmarshal exectrace: %w", err)
} }
et = fvmEt.ToExecutionTrace() et = fvmEt.ToExecutionTrace()
} else { }
et.Msg = vmMsg
et.MsgRct = &receipt // Set the top-level exectrace info from the message and receipt for backwards compatibility
et.Duration = duration et.Msg = vmMsg
if aerr != nil { et.MsgRct = &receipt
et.Error = aerr.Error() et.Duration = duration
} if aerr != nil {
et.Error = aerr.Error()
} }
return &ApplyRet{ return &ApplyRet{