|
1 | 1 | package stest.tron.wallet.contract.linkage; |
2 | 2 |
|
| 3 | +import static org.tron.protos.Protocol.Transaction.Result.contractResult.SUCCESS_VALUE; |
| 4 | + |
3 | 5 | import io.grpc.ManagedChannel; |
4 | 6 | import io.grpc.ManagedChannelBuilder; |
5 | 7 | import java.util.HashMap; |
|
19 | 21 | import org.tron.core.Wallet; |
20 | 22 | import org.tron.protos.Protocol.Account; |
21 | 23 | import org.tron.protos.Protocol.SmartContract; |
| 24 | +import org.tron.protos.Protocol.Transaction; |
| 25 | +import org.tron.protos.Protocol.Transaction.Result.contractResult; |
22 | 26 | import org.tron.protos.Protocol.TransactionInfo; |
23 | 27 | import stest.tron.wallet.common.client.Configuration; |
24 | 28 | import stest.tron.wallet.common.client.Parameter.CommonConstant; |
@@ -80,8 +84,13 @@ public void updateSetting() { |
80 | 84 | infoById0 = PublicMethed.getTransactionInfoById(sendcoin, blockingStubFull); |
81 | 85 | logger.info("infoById0 " + infoById0.get()); |
82 | 86 | Assert.assertEquals(ByteArray.toHexString(infoById0.get().getContractResult(0).toByteArray()), |
83 | | - "SUCCESS"); |
| 87 | + ""); |
84 | 88 | Assert.assertEquals(infoById0.get().getResult().getNumber(), 0); |
| 89 | + Optional<Transaction> ById = PublicMethed.getTransactionById(sendcoin, blockingStubFull); |
| 90 | + Assert.assertEquals(ById.get().getRet(0).getContractRet().getNumber(), |
| 91 | + SUCCESS_VALUE); |
| 92 | + Assert.assertEquals(ById.get().getRet(0).getContractRetValue(), SUCCESS_VALUE); |
| 93 | + Assert.assertEquals(ById.get().getRet(0).getContractRet(), contractResult.SUCCESS); |
85 | 94 |
|
86 | 95 | Assert.assertTrue(PublicMethed.freezeBalanceGetEnergy(linkage002Address, 50000000L, |
87 | 96 | 3, 1, linkage002Key, blockingStubFull)); |
|
0 commit comments