From e27a19c86366eeddb98f36d266bbdb220e0ce457 Mon Sep 17 00:00:00 2001 From: Helius <wangdoubleone@gmail.com> Date: Tue, 13 Oct 2020 19:57:44 +0800 Subject: [PATCH] modify --- src/main/java/com/xcong/excoin/modules/blackchain/service/EthService.java | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/xcong/excoin/modules/blackchain/service/EthService.java b/src/main/java/com/xcong/excoin/modules/blackchain/service/EthService.java index c52b39b..c2c9379 100644 --- a/src/main/java/com/xcong/excoin/modules/blackchain/service/EthService.java +++ b/src/main/java/com/xcong/excoin/modules/blackchain/service/EthService.java @@ -10,6 +10,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.concurrent.CompletableFuture; import java.util.concurrent.ExecutionException; import org.web3j.abi.FunctionEncoder; @@ -237,8 +238,9 @@ // log.debug("transfer hexValue:" + hexValue); - EthSendTransaction ethSendTransaction = web3j.ethSendRawTransaction(hexValue).sendAsync().get(); - + CompletableFuture<EthSendTransaction> ethSendTransactionCompletableFuture = web3j.ethSendRawTransaction(hexValue).sendAsync(); + EthSendTransaction ethSendTransaction = ethSendTransactionCompletableFuture.get(); + //return "hash"; if (ethSendTransaction.hasError()) { // log.info("transfer error:", ethSendTransaction.getError().getMessage()); -- Gitblit v1.9.1