Skip to content

Commit 4f1f4e8

Browse files
committed
[feat][plugins][*]: optimized plugins' code
1 parent ddb2fc7 commit 4f1f4e8

File tree

3 files changed

+11
-8
lines changed

3 files changed

+11
-8
lines changed

pluginset/eos/offchain-plugin/pom.xml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,12 @@
3333
<groupId>one.block</groupId>
3434
<artifactId>eosiojava</artifactId>
3535
<version>${eosiojava.version}</version>
36+
<exclusions>
37+
<exclusion>
38+
<groupId>org.slf4j</groupId>
39+
<artifactId>slf4j-api</artifactId>
40+
</exclusion>
41+
</exclusions>
3642
</dependency>
3743
<dependency>
3844
<groupId>com.alipay.antchain.bridge</groupId>
@@ -65,11 +71,6 @@
6571
<artifactId>eos-java-rpc-wrapper</artifactId>
6672
<version>master</version>
6773
</dependency>
68-
<dependency>
69-
<groupId>org.slf4j</groupId>
70-
<artifactId>slf4j-api</artifactId>
71-
<version>1.7.30</version>
72-
</dependency>
7374
<dependency>
7475
<groupId>junit</groupId>
7576
<artifactId>junit</artifactId>

pluginset/eos/offchain-plugin/src/main/java/com/alipay/antchain/bridge/plugins/eos/EosBBCService.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -402,6 +402,7 @@ public CrossChainMessageReceipt readCrossChainMessageReceipt(String txHash) {
402402
crossChainMessageReceipt.setErrorMsg(
403403
"call biz failed but seq updated: " + (crossChainMessageReceipt.isSuccessful() ? "SUCCESS" : txInfo.getStatus().getStatus())
404404
);
405+
crossChainMessageReceipt.setSuccessful(false);
405406
} else {
406407
crossChainMessageReceipt.setErrorMsg(
407408
"call biz: " + (crossChainMessageReceipt.isSuccessful() ? "SUCCESS" : txInfo.getStatus().getStatus())

pluginset/ethereum/offchain-plugin/src/main/java/com/alipay/antchain/bridge/plugins/ethereum/EthereumBBCService.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -195,8 +195,9 @@ private CrossChainMessageReceipt getCrossChainMessageReceipt(TransactionReceipt
195195
crossChainMessageReceipt.setSuccessful(transactionReceipt.isStatusOK() && response.result);
196196
crossChainMessageReceipt.setTxhash(transactionReceipt.getTransactionHash());
197197
crossChainMessageReceipt.setErrorMsg(
198-
transactionReceipt.isStatusOK() ? StrUtil.format("SDP calls biz contract failed: {}", response.errMsg) :
199-
StrUtil.emptyToDefault(transactionReceipt.getRevertReason(), "")
198+
transactionReceipt.isStatusOK() ? StrUtil.format(
199+
"SDP calls biz contract: {}", response.result ? "SUCCESS" : response.errMsg
200+
) : StrUtil.emptyToDefault(transactionReceipt.getRevertReason(), "")
200201
);
201202
getBBCLogger().info(
202203
"event receiveMessage from SDP contract is found in no.{} tx {} of block {} : " +
@@ -298,7 +299,7 @@ public Long queryLatestHeight() {
298299
throw new RuntimeException("failed to query latest height", e);
299300
}
300301

301-
getBBCLogger().info("latest height: {}", l);
302+
getBBCLogger().debug("latest height: {}", l);
302303
return l;
303304
}
304305

0 commit comments

Comments
 (0)