|
26 | 26 | import com.iexec.common.chain.adapter.args.TaskFinalizeArgs; |
27 | 27 | import com.iexec.common.chain.adapter.args.TaskRevealArgs; |
28 | 28 | import com.iexec.common.sdk.broker.BrokerOrder; |
29 | | -import com.iexec.common.sdk.order.payload.AppOrder; |
30 | | -import com.iexec.common.sdk.order.payload.DatasetOrder; |
31 | | -import com.iexec.common.sdk.order.payload.RequestOrder; |
32 | | -import com.iexec.common.sdk.order.payload.WorkerpoolOrder; |
33 | 29 | import com.iexec.commons.poco.chain.*; |
| 30 | +import com.iexec.commons.poco.order.AppOrder; |
| 31 | +import com.iexec.commons.poco.order.DatasetOrder; |
| 32 | +import com.iexec.commons.poco.order.RequestOrder; |
| 33 | +import com.iexec.commons.poco.order.WorkerpoolOrder; |
34 | 34 | import com.iexec.commons.poco.security.Signature; |
35 | 35 | import com.iexec.commons.poco.tee.TeeUtils; |
36 | 36 | import com.iexec.commons.poco.utils.BytesUtils; |
@@ -159,7 +159,7 @@ public void shouldBurstTransactionsWithAverageOfOneTxPerBlock(){ |
159 | 159 | //no need to wait for propagation update in db |
160 | 160 | Assertions.assertTrue(true); |
161 | 161 | } catch (Exception e) { |
162 | | - e.printStackTrace(); |
| 162 | + log.error("Watcher failed with an exception", e); |
163 | 163 | Assertions.fail(); |
164 | 164 | } |
165 | 165 | })); |
@@ -339,20 +339,19 @@ private void waitBeforeFinalizing(String chainTaskId) throws Exception { |
339 | 339 | throw new Exception("Too long to wait for reveal: " + chainTaskId); |
340 | 340 | } |
341 | 341 | } |
342 | | - System.out.println("All revealed (" + revealCounter + "/" + winnerCounter + ")"); |
| 342 | + log.info("All revealed ({}/{})", revealCounter, winnerCounter); |
343 | 343 | } |
344 | 344 |
|
345 | 345 | public WorkerpoolAuthorization mockAuthorization(String chainTaskId, |
346 | 346 | String enclaveChallenge) { |
347 | 347 | String workerWallet = credentialsService.getCredentials().getAddress(); |
348 | | - String hash = |
349 | | - HashUtils.concatenateAndHash(workerWallet, |
350 | | - chainTaskId, |
351 | | - enclaveChallenge); |
352 | | - |
353 | | - Sign.SignatureData sign = |
354 | | - Sign.signPrefixedMessage(BytesUtils.stringToBytes(hash), |
355 | | - credentialsService.getCredentials().getEcKeyPair()); |
| 348 | + String hash = HashUtils.concatenateAndHash( |
| 349 | + workerWallet, |
| 350 | + chainTaskId, |
| 351 | + enclaveChallenge); |
| 352 | + |
| 353 | + Sign.SignatureData sign = Sign.signPrefixedMessage(BytesUtils.stringToBytes(hash), |
| 354 | + credentialsService.getCredentials().getEcKeyPair()); |
356 | 355 |
|
357 | 356 | return WorkerpoolAuthorization.builder() |
358 | 357 | .workerWallet(workerWallet) |
|
0 commit comments