|
1 | 1 | package stest.tron.wallet.contract.scenario;
|
2 | 2 |
|
| 3 | +import static org.tron.protos.Protocol.Transaction.Result.contractResult.SUCCESS_VALUE; |
3 | 4 |
|
4 | 5 | import io.grpc.ManagedChannel;
|
5 | 6 | import io.grpc.ManagedChannelBuilder;
|
|
21 | 22 | import org.tron.core.Wallet;
|
22 | 23 | import org.tron.protos.Protocol.Account;
|
23 | 24 | import org.tron.protos.Protocol.SmartContract;
|
| 25 | +import org.tron.protos.Protocol.Transaction; |
| 26 | +import org.tron.protos.Protocol.Transaction.Result.contractResult; |
24 | 27 | import org.tron.protos.Protocol.TransactionInfo;
|
25 | 28 | import stest.tron.wallet.common.client.Configuration;
|
26 | 29 | import stest.tron.wallet.common.client.Parameter.CommonConstant;
|
@@ -130,7 +133,14 @@ public void testClearAbi() {
|
130 | 133 | Optional<TransactionInfo> infoById = null;
|
131 | 134 | infoById = PublicMethed.getTransactionInfoById(txid, blockingStubFull);
|
132 | 135 | Assert.assertEquals(0,infoById.get().getResultValue());
|
133 |
| - Assert.assertEquals("SUCCESS",(infoById.get().getResMessage()).toString()); |
| 136 | + Assert.assertEquals("", |
| 137 | + ByteArray.toHexString(infoById.get().getResMessage().toByteArray())); |
| 138 | + |
| 139 | + Optional<Transaction> byId = PublicMethed.getTransactionById(txid, blockingStubFull); |
| 140 | + Assert.assertEquals(byId.get().getRet(0).getContractRet().getNumber(), |
| 141 | + SUCCESS_VALUE); |
| 142 | + Assert.assertEquals(byId.get().getRet(0).getContractRetValue(), SUCCESS_VALUE); |
| 143 | + Assert.assertEquals(byId.get().getRet(0).getContractRet(), contractResult.SUCCESS); |
134 | 144 |
|
135 | 145 | smartContract = PublicMethed.getContract(contractAddress, blockingStubFull);
|
136 | 146 | Assert.assertTrue(smartContract.getAbi().toString().isEmpty());
|
|
0 commit comments