Skip to content

Commit 1a29b55

Browse files
author
Ugo Plouviez
committed
Don't send anything to core if transaction receipt is null
1 parent 76aafba commit 1a29b55

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,6 @@ public Optional<ChainReceipt> reveal(String chainTaskId) {
8787
}
8888

8989
IexecHubABILegacy.TaskRevealEventResponse revealResponse = iexecHubService.reveal(chainTaskId, deterministHash);
90-
9190
if (revealResponse == null) {
9291
log.error("RevealTransactionReceipt received but was null [chainTaskId:{}]", chainTaskId);
9392
return Optional.empty();

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

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -323,9 +323,7 @@ public void contribute(ContributionAuthorization contribAuth) {
323323

324324
Optional<ChainReceipt> oChainReceipt = contributionService.contribute(contribAuth, deterministHash, enclaveSignature);
325325
if (!oChainReceipt.isPresent()) {
326-
ChainReceipt chainReceipt = new ChainReceipt(iexecHubService.getLatestBlockNumber(), "");
327-
customFeignClient.updateReplicateStatus(chainTaskId, CONTRIBUTE_FAILED,
328-
ReplicateDetails.builder().chainReceipt(chainReceipt).build());
326+
log.warn("The chain receipt of the contribution is empty, nothing will be sent to the core [chainTaskId:{}]", chainTaskId);
329327
return;
330328
}
331329

@@ -367,9 +365,7 @@ public void reveal(String chainTaskId, long consensusBlock) {
367365

368366
Optional<ChainReceipt> optionalChainReceipt = revealService.reveal(chainTaskId);
369367
if (!optionalChainReceipt.isPresent()) {
370-
ChainReceipt chainReceipt = new ChainReceipt(iexecHubService.getLatestBlockNumber(), "");
371-
customFeignClient.updateReplicateStatus(chainTaskId, REVEAL_FAILED,
372-
ReplicateDetails.builder().chainReceipt(chainReceipt).build());
368+
log.warn("The chain receipt of the reveal is empty, nothing will be sent to the core [chainTaskId:{}]", chainTaskId);
373369
return;
374370
}
375371

0 commit comments

Comments
 (0)