Skip to content

Commit a8eaf6f

Browse files
committed
modify the hard fork
1 parent 9f8f90d commit a8eaf6f

File tree

4 files changed

+5
-12
lines changed

4 files changed

+5
-12
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ public static void validator(DynamicPropertiesStore dynamicPropertiesStore, Fork
302302
break;
303303
}
304304
case ALLOW_SHIELDED_TRC20_TRANSACTION: {
305-
if (!forkUtils.pass(ForkBlockVersionEnum.VERSION_4_0)) {
305+
if (!forkUtils.pass(ForkBlockVersionEnum.VERSION_4_0_1)) {
306306
throw new ContractValidateException(
307307
"Bad chain parameter id [ALLOW_SHIELDED_TRC20_TRANSACTION]");
308308
}

chainbase/src/main/java/org/tron/common/utils/ForkUtils.java

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,6 @@ private boolean passNew(int version) {
6666
if (latestBlockTime < hardForkTime) {
6767
return false;
6868
}
69-
Boolean hardForkResult = dynamicPropertiesStore.getForked(version);
70-
if (hardForkResult != null) {
71-
return hardForkResult;
72-
}
7369
byte[] stats = dynamicPropertiesStore.statsByVersion(version);
7470
if (stats == null || stats.length == 0) {
7571
return false;
@@ -80,11 +76,7 @@ private boolean passNew(int version) {
8076
++count;
8177
}
8278
}
83-
hardForkResult = count >= versionEnum.getHardForkCount();
84-
dynamicPropertiesStore.forked(version, hardForkResult);
85-
logger.info("******** update block version {} hard fork result:{} ********", version,
86-
hardForkResult);
87-
return hardForkResult;
79+
return count >= versionEnum.getHardForkCount();
8880
}
8981

9082
// when block.version = 5,

chainbase/src/main/java/org/tron/core/config/Parameter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public class ChainConstant {
1818
public static final int SINGLE_REPEAT = 1;
1919
public static final int BLOCK_FILLED_SLOTS_NUMBER = 128;
2020
public static final int MAX_FROZEN_NUMBER = 1;
21-
public static final int BLOCK_VERSION = 16;
21+
public static final int BLOCK_VERSION = 17;
2222
}
2323

2424
public class NodeConstant {

chainbase/src/main/java/org/tron/core/config/args/Parameter.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ public enum ForkBlockVersionEnum {
1111
VERSION_3_6(8, 0L, 0),
1212
VERSION_3_6_5(9, 0L, 0),
1313
VERSION_3_6_6(10, 0L, 0),
14-
VERSION_4_0(16, 0L, 0);
14+
VERSION_4_0(16, 0L, 0),
15+
VERSION_4_0_1(17, 1L, 22);
1516

1617
@Getter
1718
private int value;

0 commit comments

Comments
 (0)