Skip to content

Commit a5ee4b4

Browse files
Merge pull request #306 from iExecBlockchainComputing/feature/callback
Feature/callback
2 parents be2702a + 8e6eef9 commit a5ee4b4

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +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-
6160
try {
6261
docker.pull(image);
6362
} catch (DockerException | InterruptedException e) {

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,14 @@ private String getNonTeeDeterminismHash(String chainTaskId) {
200200
Path determinismFilePath = Paths.get(filePath);
201201

202202
try {
203+
String callbackFilePathName = workerConfigService.getTaskIexecOutDir(chainTaskId)
204+
+ File.separator + CALLBACK_FILE_NAME;
205+
206+
String callbackData = getCallbackDataFromPath(callbackFilePathName);
207+
if (!callbackData.isEmpty()){
208+
return Hash.sha3(callbackData);
209+
}
210+
203211
if (determinismFilePath.toFile().exists()) {
204212
hash = getHashFromDeterminismIexecFile(determinismFilePath);
205213
log.info("Determinism file found and its hash has been computed "

0 commit comments

Comments
 (0)