fix: fvm: make exectraces match legacyVM some more

This commit is contained in:
Aayush 2022-06-22 11:26:23 -04:00
parent d6e00bcd4e
commit 866693f3d5

View File

@ -339,14 +339,15 @@ 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 { }
// Set the top-level exectrace info from the message and receipt for backwards compatibility
et.Msg = vmMsg et.Msg = vmMsg
et.MsgRct = &receipt et.MsgRct = &receipt
et.Duration = duration et.Duration = duration
if aerr != nil { if aerr != nil {
et.Error = aerr.Error() et.Error = aerr.Error()
} }
}
return &ApplyRet{ return &ApplyRet{
MessageReceipt: receipt, MessageReceipt: receipt,