diff --git a/chainbase/src/main/java/org/tron/core/store/DynamicPropertiesStore.java b/chainbase/src/main/java/org/tron/core/store/DynamicPropertiesStore.java index 91e8723bd2..89c5ba18e5 100644 --- a/chainbase/src/main/java/org/tron/core/store/DynamicPropertiesStore.java +++ b/chainbase/src/main/java/org/tron/core/store/DynamicPropertiesStore.java @@ -2957,7 +2957,7 @@ public long getAllowTvmSelfdestructRestriction() { return Optional.ofNullable(getUnchecked(ALLOW_TVM_SELFDESTRUCT_RESTRICTION)) .map(BytesCapsule::getData) .map(ByteArray::toLong) - .orElse(CommonParameter.getInstance().getAllowTvmSelfdestructRestriction()); + .orElse(0L); } public void saveAllowTvmSelfdestructRestriction(long value) { diff --git a/common/src/main/java/org/tron/common/parameter/CommonParameter.java b/common/src/main/java/org/tron/common/parameter/CommonParameter.java index c70775cc8f..314990625a 100644 --- a/common/src/main/java/org/tron/common/parameter/CommonParameter.java +++ b/common/src/main/java/org/tron/common/parameter/CommonParameter.java @@ -750,10 +750,6 @@ public class CommonParameter { @Setter public long allowTvmBlob; - @Getter - @Setter - public long allowTvmSelfdestructRestriction; - private static double calcMaxTimeRatio() { //return max(2.0, min(5.0, 5 * 4.0 / max(Runtime.getRuntime().availableProcessors(), 1))); return 5.0; diff --git a/common/src/main/java/org/tron/core/Constant.java b/common/src/main/java/org/tron/core/Constant.java index 5b0488561a..f7ccb9bd50 100644 --- a/common/src/main/java/org/tron/core/Constant.java +++ b/common/src/main/java/org/tron/core/Constant.java @@ -421,9 +421,6 @@ public class Constant { public static final String COMMITTEE_ALLOW_TVM_BLOB = "committee.allowTvmBlob"; - public static final String COMMITTEE_ALLOW_TVM_SELFDESTRUCT_RESTRICTION = - "committee.allowTvmSelfdestructRestriction"; - public static final String COMMITTEE_PROPOSAL_EXPIRE_TIME = "committee.proposalExpireTime"; } diff --git a/framework/src/main/java/org/tron/core/config/args/Args.java b/framework/src/main/java/org/tron/core/config/args/Args.java index b2972e950b..3dd4fc7c6a 100644 --- a/framework/src/main/java/org/tron/core/config/args/Args.java +++ b/framework/src/main/java/org/tron/core/config/args/Args.java @@ -250,7 +250,6 @@ public static void clearParam() { PARAMETER.consensusLogicOptimization = 0; PARAMETER.allowTvmCancun = 0; PARAMETER.allowTvmBlob = 0; - PARAMETER.allowTvmSelfdestructRestriction = 0; PARAMETER.rpcMaxRstStream = 0; PARAMETER.rpcSecondsPerWindow = 0; } @@ -1272,10 +1271,6 @@ public static void setParam(final Config config) { config.hasPath(Constant.COMMITTEE_ALLOW_TVM_BLOB) ? config .getInt(Constant.COMMITTEE_ALLOW_TVM_BLOB) : 0; - PARAMETER.allowTvmSelfdestructRestriction = - config.hasPath(Constant.COMMITTEE_ALLOW_TVM_SELFDESTRUCT_RESTRICTION) ? config - .getInt(Constant.COMMITTEE_ALLOW_TVM_SELFDESTRUCT_RESTRICTION) : 0; - logConfig(); } diff --git a/framework/src/test/java/org/tron/common/ParameterTest.java b/framework/src/test/java/org/tron/common/ParameterTest.java index 6724ced20b..2f65189ac1 100644 --- a/framework/src/test/java/org/tron/common/ParameterTest.java +++ b/framework/src/test/java/org/tron/common/ParameterTest.java @@ -322,7 +322,5 @@ public void testCommonParameter() { assertEquals(1, parameter.getAllowEnergyAdjustment()); parameter.setMaxCreateAccountTxSize(1000); assertEquals(1000, parameter.getMaxCreateAccountTxSize()); - parameter.setAllowTvmSelfdestructRestriction(1); - assertEquals(1, parameter.getAllowTvmSelfdestructRestriction()); } }