diff --git a/actuator/src/main/java/org/tron/core/vm/nativecontract/UnfreezeBalanceV2Processor.java b/actuator/src/main/java/org/tron/core/vm/nativecontract/UnfreezeBalanceV2Processor.java index 56366bbdb0c..c8199651a7f 100644 --- a/actuator/src/main/java/org/tron/core/vm/nativecontract/UnfreezeBalanceV2Processor.java +++ b/actuator/src/main/java/org/tron/core/vm/nativecontract/UnfreezeBalanceV2Processor.java @@ -84,7 +84,7 @@ public void validate(UnfreezeBalanceV2Param param, Repository repo) if (!checkUnfreezeBalance(accountCapsule, param.getUnfreezeBalance(), param.getResourceType())) { throw new ContractValidateException( - "Invalid unfreeze_balance, [" + param.getUnfreezeBalance() + "] is error"); + "Invalid unfreeze_balance, [" + param.getUnfreezeBalance() + "] is too large"); } } diff --git a/framework/src/test/java/org/tron/common/runtime/vm/BatchValidateSignContractTest.java b/framework/src/test/java/org/tron/common/runtime/vm/BatchValidateSignContractTest.java index d094f1a3d05..3fa52aa70c0 100644 --- a/framework/src/test/java/org/tron/common/runtime/vm/BatchValidateSignContractTest.java +++ b/framework/src/test/java/org/tron/common/runtime/vm/BatchValidateSignContractTest.java @@ -79,7 +79,7 @@ public void staticCallTest() { @Test public void correctionTest() { - contract.setConstantCall(false); + contract.setConstantCall(true); List signatures = new ArrayList<>(); List addresses = new ArrayList<>(); byte[] hash = Hash.sha3(longData); diff --git a/framework/src/test/java/org/tron/common/runtime/vm/Create2Test.java b/framework/src/test/java/org/tron/common/runtime/vm/Create2Test.java index 79ed1c7e1f8..a63abd97930 100644 --- a/framework/src/test/java/org/tron/common/runtime/vm/Create2Test.java +++ b/framework/src/test/java/org/tron/common/runtime/vm/Create2Test.java @@ -160,9 +160,16 @@ public void testCreate2() // Trigger contract method: deploy(bytes,uint) long salt = 100L; String hexInput = AbiUtil.parseMethod(methodSign, Arrays.asList(testCode, salt)); - TVMTestResult result = TvmTestUtils - .triggerContractAndReturnTvmTestResult(Hex.decode(OWNER_ADDRESS), - factoryAddress, Hex.decode(hexInput), 0, fee, manager, null); + + TVMTestResult result = null; + for (int i = 1; i < 3; i++) { + result = TvmTestUtils + .triggerContractAndReturnTvmTestResult(Hex.decode(OWNER_ADDRESS), + factoryAddress, Hex.decode(hexInput), 0, fee, manager, null); + if (result.getRuntime().getRuntimeError() == null) { + break; + } + } Assert.assertNull(result.getRuntime().getRuntimeError()); byte[] returnValue = result.getRuntime().getResult().getHReturn();