Skip to content

Commit 7a5ae39

Browse files
committed
func(cfg): parameters should have a higher priority on the command line than in the configuration file
1 parent f9a4544 commit 7a5ae39

File tree

1 file changed

+6
-3
lines changed
  • framework/src/main/java/org/tron/core/config/args

1 file changed

+6
-3
lines changed

framework/src/main/java/org/tron/core/config/args/Args.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -915,15 +915,18 @@ public static void setParam(final Config config) {
915915
PARAMETER.vmTrace =
916916
config.hasPath(Constant.VM_TRACE) && config.getBoolean(Constant.VM_TRACE);
917917

918-
if (config.hasPath(Constant.VM_SAVE_INTERNAL_TX)) {
918+
if (!PARAMETER.saveInternalTx
919+
&& config.hasPath(Constant.VM_SAVE_INTERNAL_TX)) {
919920
PARAMETER.saveInternalTx = config.getBoolean(Constant.VM_SAVE_INTERNAL_TX);
920921
}
921922

922-
if (config.hasPath(Constant.VM_SAVE_FEATURED_INTERNAL_TX)) {
923+
if (!PARAMETER.saveFeaturedInternalTx
924+
&& config.hasPath(Constant.VM_SAVE_FEATURED_INTERNAL_TX)) {
923925
PARAMETER.saveFeaturedInternalTx = config.getBoolean(Constant.VM_SAVE_FEATURED_INTERNAL_TX);
924926
}
925927

926-
if (config.hasPath(Constant.VM_SAVE_CANCEL_ALL_UNFREEZE_V2_DETAILS)) {
928+
if (!PARAMETER.saveCancelAllUnfreezeV2Details
929+
&& config.hasPath(Constant.VM_SAVE_CANCEL_ALL_UNFREEZE_V2_DETAILS)) {
927930
PARAMETER.saveCancelAllUnfreezeV2Details =
928931
config.getBoolean(Constant.VM_SAVE_CANCEL_ALL_UNFREEZE_V2_DETAILS);
929932
}

0 commit comments

Comments
 (0)