Skip to content

Commit 0e4652d

Browse files
committed
func(cfg): revert reprioritize for old internal tx switches
1 parent 1e8d839 commit 0e4652d

File tree

3 files changed

+14
-9
lines changed

3 files changed

+14
-9
lines changed

actuator/src/main/java/org/tron/core/vm/nativecontract/UnfreezeBalanceV2Processor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ public void validate(UnfreezeBalanceV2Param param, Repository repo)
8484

8585
if (!checkUnfreezeBalance(accountCapsule, param.getUnfreezeBalance(), param.getResourceType())) {
8686
throw new ContractValidateException(
87-
"Invalid unfreeze_balance, [" + param.getUnfreezeBalance() + "] is too large");
87+
"Invalid unfreeze_balance, [" + param.getUnfreezeBalance() + "] is invalid");
8888
}
8989
}
9090

framework/src/main/java/org/tron/core/config/args/Args.java

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -917,15 +917,13 @@ public static void setParam(final Config config) {
917917
PARAMETER.vmTrace =
918918
config.hasPath(Constant.VM_TRACE) && config.getBoolean(Constant.VM_TRACE);
919919

920-
if (!PARAMETER.saveInternalTx
921-
&& config.hasPath(Constant.VM_SAVE_INTERNAL_TX)) {
922-
PARAMETER.saveInternalTx = config.getBoolean(Constant.VM_SAVE_INTERNAL_TX);
923-
}
920+
PARAMETER.saveInternalTx =
921+
config.hasPath(Constant.VM_SAVE_INTERNAL_TX)
922+
&& config.getBoolean(Constant.VM_SAVE_INTERNAL_TX);
924923

925-
if (!PARAMETER.saveFeaturedInternalTx
926-
&& config.hasPath(Constant.VM_SAVE_FEATURED_INTERNAL_TX)) {
927-
PARAMETER.saveFeaturedInternalTx = config.getBoolean(Constant.VM_SAVE_FEATURED_INTERNAL_TX);
928-
}
924+
PARAMETER.saveFeaturedInternalTx =
925+
config.hasPath(Constant.VM_SAVE_FEATURED_INTERNAL_TX)
926+
&& config.getBoolean(Constant.VM_SAVE_FEATURED_INTERNAL_TX);
929927

930928
if (!PARAMETER.saveCancelAllUnfreezeV2Details
931929
&& config.hasPath(Constant.VM_SAVE_CANCEL_ALL_UNFREEZE_V2_DETAILS)) {

framework/src/test/java/org/tron/common/runtime/vm/Create2Test.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import lombok.extern.slf4j.Slf4j;
99
import org.bouncycastle.util.encoders.Hex;
1010
import org.junit.Assert;
11+
import org.junit.Before;
1112
import org.junit.Test;
1213
import org.tron.common.runtime.TVMTestResult;
1314
import org.tron.common.runtime.TvmTestUtils;
@@ -23,6 +24,7 @@
2324
import org.tron.core.exception.VMIllegalException;
2425
import org.tron.core.services.NodeInfoService;
2526
import org.tron.core.services.jsonrpc.TronJsonRpcImpl;
27+
import org.tron.core.vm.config.ConfigLoader;
2628
import org.tron.protos.Protocol.Transaction;
2729

2830

@@ -103,6 +105,11 @@ triggercontract Txxxxxxxxxxx deploy(bytes,uint256) bytes,uint256 false 100000000
103105
104106
*/
105107

108+
@Before
109+
public void before() {
110+
ConfigLoader.disable = false;
111+
}
112+
106113
@Test
107114
public void testCreate2()
108115
throws ContractExeException, ReceiptCheckErrException,

0 commit comments

Comments
 (0)