File tree Expand file tree Collapse file tree
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 @@ -1299,12 +1299,17 @@ public static void setParam(final Config config) {
12991299 config .hasPath (Constant .COMMITTEE_ALLOW_TVM_BLOB ) ? config
13001300 .getInt (Constant .COMMITTEE_ALLOW_TVM_BLOB ) : 0 ;
13011301
1302- PARAMETER .proposalVotingWindow =
1303- config .hasPath (Constant .BLOCK_PROPOSAL_EXPIRE_TIME ) ?
1304- config .getInt (Constant .BLOCK_PROPOSAL_EXPIRE_TIME ) :
1305- (config .hasPath (Constant .COMMITTEE_PROPOSAL_VOTING_WINDOW ) ?
1306- config .getInt (Constant .COMMITTEE_PROPOSAL_VOTING_WINDOW ) :
1307- DEFAULT_PROPOSAL_VOTING_WINDOW );
1302+ if (config .hasPath (Constant .COMMITTEE_PROPOSAL_VOTING_WINDOW )) {
1303+ // Highest priority: As long as COMMITTEE-PPOSAL_VOTING-WINDOW is configured, it will be taken
1304+ PARAMETER .proposalVotingWindow = config .getInt (Constant .COMMITTEE_PROPOSAL_VOTING_WINDOW );
1305+ } else if (config .hasPath (Constant .BLOCK_PROPOSAL_EXPIRE_TIME )) {
1306+ // Secondary priority: If the former is not configured but the latter is configured,
1307+ // choose the latter
1308+ PARAMETER .proposalVotingWindow = config .getInt (Constant .BLOCK_PROPOSAL_EXPIRE_TIME );
1309+ } else {
1310+ // Lowest priority: Neither is configured, use default values
1311+ PARAMETER .proposalVotingWindow = DEFAULT_PROPOSAL_VOTING_WINDOW ;
1312+ }
13081313
13091314 logConfig ();
13101315 }
You can’t perform that action at this time.
0 commit comments