File tree Expand file tree Collapse file tree
common/src/main/java/org/tron
framework/src/main/java/org/tron/core/config/args Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -724,6 +724,10 @@ public class CommonParameter {
724724 @ Setter
725725 public long allowTvmBlob ;
726726
727+ /**
728+ * Committee parameter.
729+ * Indicate the number of blocks after which the proposal approval window will take effect.
730+ */
727731 @ Getter
728732 @ Setter
729733 public long proposalVotingWindow ;
Original file line number Diff line number Diff line change @@ -41,6 +41,10 @@ public class Constant {
4141 public static final long CREATOR_DEFAULT_ENERGY_LIMIT = 1000 * 10_000L ;
4242 public static final long MIN_PROPOSAL_VOTING_WINDOW = 0L ; // Number of blocks to 0 day
4343 public static final long MAX_PROPOSAL_VOTING_WINDOW = 10512000L ; // Number of blocks to 365 days
44+ /**
45+ * default number of blocks to 3 days
46+ */
47+ public static final long DEFAULT_PROPOSAL_VOTING_WINDOW = 86400L ;
4448
4549
4650 // Numbers
Original file line number Diff line number Diff line change 44import static org .tron .common .math .Maths .max ;
55import static org .tron .common .math .Maths .min ;
66import static org .tron .core .Constant .ADD_PRE_FIX_BYTE_MAINNET ;
7+ import static org .tron .core .Constant .DEFAULT_PROPOSAL_VOTING_WINDOW ;
78import static org .tron .core .Constant .DYNAMIC_ENERGY_INCREASE_FACTOR_RANGE ;
89import static org .tron .core .Constant .DYNAMIC_ENERGY_MAX_FACTOR_RANGE ;
910import static org .tron .core .config .Parameter .ChainConstant .BLOCK_PRODUCE_TIMEOUT_PERCENT ;
@@ -247,6 +248,7 @@ public static void clearParam() {
247248 PARAMETER .consensusLogicOptimization = 0 ;
248249 PARAMETER .allowTvmCancun = 0 ;
249250 PARAMETER .allowTvmBlob = 0 ;
251+ PARAMETER .proposalVotingWindow = DEFAULT_PROPOSAL_VOTING_WINDOW ;
250252 }
251253
252254 /**
@@ -1299,7 +1301,7 @@ public static void setParam(final Config config) {
12991301
13001302 PARAMETER .proposalVotingWindow =
13011303 config .hasPath (Constant .COMMITTEE_PROPOSAL_VOTING_WINDOW ) ? config
1302- .getInt (Constant .COMMITTEE_PROPOSAL_VOTING_WINDOW ) : 86400L ;
1304+ .getInt (Constant .COMMITTEE_PROPOSAL_VOTING_WINDOW ) : DEFAULT_PROPOSAL_VOTING_WINDOW ;
13031305
13041306 logConfig ();
13051307 }
You can’t perform that action at this time.
0 commit comments