File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
src/main/java/com/iexec/worker/executor Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -143,12 +143,6 @@ private String compute(ContributionAuthorization contributionAuth) {
143143 throw new IllegalArgumentException ("Task not initialized onchain yet" );
144144 }
145145
146- // if (TeeEnabled && no Tee supported) => return;
147- boolean doesTaskNeedTee = !contributionAuth .getEnclaveChallenge ().equals (BytesUtils .EMPTY_ADDRESS );
148- if (doesTaskNeedTee && !workerConfigurationService .isTeeEnabled ()) {
149- throw new UnsupportedOperationException ("Task needs TEE, I don't support it" );
150- }
151-
152146 Optional <TaskDescription > taskDescriptionFromChain = iexecHubService .getTaskDescriptionFromChain (chainTaskId );
153147
154148 if (!taskDescriptionFromChain .isPresent ()){
@@ -159,6 +153,12 @@ private String compute(ContributionAuthorization contributionAuth) {
159153
160154 TaskDescription taskDescription = taskDescriptionFromChain .get ();
161155
156+ // if (TeeEnabled && no Tee supported) => return;
157+ boolean doesTaskNeedTee = taskDescription .isTrustedExecution ();
158+ if (doesTaskNeedTee && !workerConfigurationService .isTeeEnabled ()) {
159+ throw new UnsupportedOperationException ("Task needs TEE, I don't support it" );
160+ }
161+
162162 // check app type
163163 customFeignClient .updateReplicateStatus (chainTaskId , RUNNING );
164164 if (!taskDescription .getAppType ().equals (DappType .DOCKER )) {
You can’t perform that action at this time.
0 commit comments