Skip to content

Commit f057d86

Browse files
author
Jérémy James Toussaint
committed
Removed useless blocks
1 parent 0f31278 commit f057d86

File tree

3 files changed

+4
-46
lines changed

3 files changed

+4
-46
lines changed

src/main/java/com/iexec/worker/chain/ContributionService.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,10 @@ public ContributionAuthorization getContributionAuthorization(String chainTaskId
144144
return contributionAuthorizationService.getContributionAuthorization(chainTaskId);
145145
}
146146

147+
/*
148+
* TODO See if it possible to remove useless fields from ContributionAuthorization:
149+
* remove/merge, define Contribution/ContributionAuthorization responsibilities
150+
*/
147151
//TODO Add unit test
148152
public Contribution getContribution(ComputedFile computedFile, ContributionAuthorization contributionAuthorization) {
149153
String chainTaskId = computedFile.getTaskId();

src/main/java/com/iexec/worker/docker/CustomDockerClient.java

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -57,17 +57,6 @@ public CustomDockerClient() throws DockerCertificateException {
5757

5858
public boolean pullImage(String chainTaskId, String image) {
5959
log.info("Image pull started [chainTaskId:{}, image:{}]", chainTaskId, image);
60-
/*
61-
try {
62-
docker.pull(image);
63-
} catch (DockerException | InterruptedException e) {
64-
log.error("Image pull failed [chainTaskId:{}, image:{}]", chainTaskId, image);
65-
e.printStackTrace();
66-
return false;
67-
}
68-
69-
log.info("Image pull completed [chainTaskId:{}, image:{}]", chainTaskId, image);
70-
*/
7160
return true;
7261
}
7362

src/main/java/com/iexec/worker/result/ResultService.java

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -227,41 +227,6 @@ private String computeResultDigest(ComputedFile computedFile) {
227227
return resultDigest;
228228
}
229229

230-
231-
@Deprecated
232-
public Optional<TeeEnclaveChallengeSignature> readTeeEnclaveChallengeSignatureFile(String chainTaskId) {
233-
String enclaveSignatureFilePath = workerConfigService.getTaskIexecOutDir(chainTaskId)
234-
+ File.separator + TEE_ENCLAVE_SIGNATURE_FILE_NAME;
235-
236-
File enclaveSignatureFile = new File(enclaveSignatureFilePath);
237-
238-
if (!enclaveSignatureFile.exists()) {
239-
log.error("File enclaveSig.iexec not found [chainTaskId:{}, enclaveSignatureFilePath:{}]",
240-
chainTaskId, enclaveSignatureFilePath);
241-
return Optional.empty();
242-
}
243-
244-
ObjectMapper mapper = new ObjectMapper();
245-
TeeEnclaveChallengeSignature enclaveChallengeSignature = null;
246-
try {
247-
enclaveChallengeSignature = mapper.readValue(enclaveSignatureFile, TeeEnclaveChallengeSignature.class);
248-
} catch (IOException e) {
249-
log.error("File enclaveSig.iexec found but failed to parse it [chainTaskId:{}]", chainTaskId);
250-
e.printStackTrace();
251-
return Optional.empty();
252-
}
253-
254-
if (enclaveChallengeSignature == null) {
255-
log.error("File enclaveSig.iexec found but was parsed to null [chainTaskId:{}]", chainTaskId);
256-
return Optional.empty();
257-
}
258-
259-
log.debug("Content of enclaveSig.iexec file [chainTaskId:{}, enclaveChallengeSignature:{}]",
260-
chainTaskId, enclaveChallengeSignature);
261-
262-
return Optional.of(enclaveChallengeSignature);
263-
}
264-
265230
public boolean isResultEncryptionNeeded(String chainTaskId) {
266231
String beneficiarySecretFilePath = workerConfigService.getBeneficiarySecretFilePath(chainTaskId);
267232

0 commit comments

Comments
 (0)