Skip to content

Commit 0c043e9

Browse files
author
Ugo Plouviez
committed
Minor bug in encryption
1 parent 0d98e4e commit 0c043e9

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/main/java/com/iexec/worker/executor/TaskExecutorService.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff 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)) {

0 commit comments

Comments
 (0)