@@ -160,10 +160,10 @@ public boolean isAppDownloaded(String imageUri) {
160160 * @see PreComputeService#runTeePreCompute(TaskDescription)
161161 */
162162 public PreComputeResponse runPreCompute (final TaskDescription taskDescription ) {
163- log .info ("Running pre-compute [chainTaskId:{}, requiresSgx:{}]" ,
164- taskDescription .getChainTaskId (), taskDescription .requiresSgx ());
163+ log .info ("Running pre-compute [chainTaskId:{}, requiresSgx:{}, requiresTdx:{} ]" ,
164+ taskDescription .getChainTaskId (), taskDescription .requiresSgx (), taskDescription . requiresTdx () );
165165
166- if (taskDescription .requiresSgx ()) {
166+ if (taskDescription .requiresSgx () || taskDescription . requiresTdx () ) {
167167 return preComputeService .runTeePreCompute (taskDescription );
168168 }
169169 return PreComputeResponse .builder ().build ();
@@ -178,8 +178,8 @@ public PreComputeResponse runPreCompute(final TaskDescription taskDescription) {
178178 */
179179 public AppComputeResponse runCompute (final TaskDescription taskDescription ) {
180180 final String chainTaskId = taskDescription .getChainTaskId ();
181- log .info ("Running compute [chainTaskId:{}, requiresSgx:{}]" ,
182- chainTaskId , taskDescription .requiresSgx ());
181+ log .info ("Running compute [chainTaskId:{}, requiresSgx:{}, requiresTdx:{} ]" ,
182+ chainTaskId , taskDescription .requiresSgx (), taskDescription . requiresTdx () );
183183
184184 final AppComputeResponse appComputeResponse = appComputeService .runCompute (taskDescription );
185185
@@ -211,11 +211,11 @@ private void writeLogs(String chainTaskId, String filename, String logs) {
211211 */
212212 public PostComputeResponse runPostCompute (final TaskDescription taskDescription ) {
213213 final String chainTaskId = taskDescription .getChainTaskId ();
214- log .info ("Running post-compute [chainTaskId:{}, requiresSgx:{}]" ,
215- chainTaskId , taskDescription .requiresSgx ());
214+ log .info ("Running post-compute [chainTaskId:{}, requiresSgx:{}, requiresTdx:{} ]" ,
215+ chainTaskId , taskDescription .requiresSgx (), taskDescription . requiresTdx () );
216216
217217 final PostComputeResponse postComputeResponse ;
218- if (!taskDescription .requiresSgx ()) {
218+ if (!taskDescription .requiresSgx () && ! taskDescription . requiresTdx () ) {
219219 postComputeResponse = postComputeService .runStandardPostCompute (taskDescription );
220220 } else {
221221 postComputeResponse = postComputeService .runTeePostCompute (taskDescription );
0 commit comments