Skip to content

Commit eb2b880

Browse files
committed
func(proposal): proposal 81th will not be able to be reopened in the state in which it was opened.
1 parent 9da13ac commit eb2b880

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

actuator/src/main/java/org/tron/core/utils/ProposalUtil.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -753,6 +753,10 @@ public static void validator(DynamicPropertiesStore dynamicPropertiesStore,
753753
throw new ContractValidateException(
754754
"Bad chain parameter id [ALLOW_ENERGY_ADJUSTMENT]");
755755
}
756+
if (dynamicPropertiesStore.getAllowEnergyAdjustment() == 1) {
757+
throw new ContractValidateException(
758+
"[ALLOW_ENERGY_ADJUSTMENT] has been valid, no need to propose again");
759+
}
756760
if (value != 1) {
757761
throw new ContractValidateException(
758762
"This value[ALLOW_ENERGY_ADJUSTMENT] is only allowed to be 1");

chainbase/src/main/java/org/tron/core/store/DynamicPropertiesStore.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ public class DynamicPropertiesStore extends TronStoreWithRevoking<BytesCapsule>
219219

220220
private static final byte[] ALLOW_OLD_REWARD_OPT = "ALLOW_OLD_REWARD_OPT".getBytes();
221221

222-
private static final byte[] ALLOW_ENERGY_ADJUSTMENT = "ALLOW_FAIR_ENERGY_ADJUSTMENT".getBytes();
222+
private static final byte[] ALLOW_ENERGY_ADJUSTMENT = "ALLOW_ENERGY_ADJUSTMENT".getBytes();
223223

224224
@Autowired
225225
private DynamicPropertiesStore(@Value("properties") String dbName) {

0 commit comments

Comments
 (0)