Skip to content

Commit b01d5c7

Browse files
authored
Merge pull request #3246 from tronprotocol/release_vm_shielded_4.0
Release vm shielded 4.0
2 parents d73ac95 + b836c72 commit b01d5c7

File tree

97 files changed

+21349
-2192
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

97 files changed

+21349
-2192
lines changed

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

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,17 @@ public static void validator(DynamicPropertiesStore dynamicPropertiesStore, Fork
301301
}
302302
break;
303303
}
304+
case ALLOW_SHIELDED_TRC20_TRANSACTION: {
305+
if (!forkUtils.pass(ForkBlockVersionEnum.VERSION_4_0)) {
306+
throw new ContractValidateException(
307+
"Bad chain parameter id [ALLOW_SHIELDED_TRC20_TRANSACTION]");
308+
}
309+
if (value != 1 && value != 0) {
310+
throw new ContractValidateException(
311+
"This value[ALLOW_SHIELDED_TRC20_TRANSACTION] is only allowed to be 1 or 0");
312+
}
313+
break;
314+
}
304315
default:
305316
break;
306317
}
@@ -341,8 +352,9 @@ public enum ProposalType {
341352
WITNESS_127_PAY_PER_BLOCK(31), //drop, 31
342353
ALLOW_TVM_SOLIDITY_059(32), // 1, 32
343354
ADAPTIVE_RESOURCE_LIMIT_TARGET_RATIO(33), // 10, 33
344-
// SHIELDED_TRANSACTION_CREATE_ACCOUNT_FEE(34); // 34
345-
FORBID_TRANSFER_TO_CONTRACT(35); // 1, 35
355+
// SHIELDED_TRANSACTION_CREATE_ACCOUNT_FEE(34); // 34
356+
FORBID_TRANSFER_TO_CONTRACT(35), // 1, 35
357+
ALLOW_SHIELDED_TRC20_TRANSACTION(39); // 1, 39
346358

347359
private long code;
348360

0 commit comments

Comments
 (0)