Skip to content

Commit cce83a4

Browse files
committed
reset minTimeRatio.
1 parent 24c1b6b commit cce83a4

File tree

1 file changed

+9
-9
lines changed
  • src/main/java/org/tron/core/config/args

1 file changed

+9
-9
lines changed

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

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
package org.tron.core.config.args;
22

3-
import static java.lang.Math.max;
4-
import static java.lang.Math.min;
5-
63
import com.beust.jcommander.JCommander;
74
import com.beust.jcommander.Parameter;
85
import com.typesafe.config.Config;
@@ -82,7 +79,7 @@ public class Args {
8279
@Getter
8380
@Setter
8481
@Parameter(names = {"--min-time-ratio"})
85-
private double minTimeRatio = 0.6;
82+
private double minTimeRatio = 0.0;
8683

8784
@Getter
8885
@Setter
@@ -391,7 +388,7 @@ public static void clearParam() {
391388
INSTANCE.isOpenFullTcpDisconnect = false;
392389
INSTANCE.supportConstant = false;
393390
INSTANCE.debug = false;
394-
INSTANCE.minTimeRatio = 0.6;
391+
INSTANCE.minTimeRatio = 0.0;
395392
INSTANCE.maxTimeRatio = 5.0;
396393
INSTANCE.longRunningTime = 10;
397394
}
@@ -542,7 +539,8 @@ public static void setParam(final String[] args, final String confFileName) {
542539
config.hasPath("node.maxActiveNodes") ? config.getInt("node.maxActiveNodes") : 30;
543540

544541
INSTANCE.nodeMaxActiveNodesWithSameIp =
545-
config.hasPath("node.maxActiveNodesWithSameIp") ? config.getInt("node.maxActiveNodesWithSameIp") : 2;
542+
config.hasPath("node.maxActiveNodesWithSameIp") ? config
543+
.getInt("node.maxActiveNodesWithSameIp") : 2;
546544

547545
INSTANCE.minParticipationRate =
548546
config.hasPath("node.minParticipationRate") ? config.getInt("node.minParticipationRate")
@@ -649,7 +647,8 @@ public static void setParam(final String[] args, final String confFileName) {
649647
config.getLong("node.receiveTcpMinDataLength") : 2048;
650648
INSTANCE.isOpenFullTcpDisconnect = config.hasPath("node.isOpenFullTcpDisconnect") && config
651649
.getBoolean("node.isOpenFullTcpDisconnect");
652-
INSTANCE.logLevel = config.hasPath("log.level.root") ? config.getString("log.level.root") : "INFO";
650+
INSTANCE.logLevel =
651+
config.hasPath("log.level.root") ? config.getString("log.level.root") : "INFO";
653652

654653
initBackupProperty(config);
655654

@@ -837,7 +836,8 @@ public ECKey getMyKey() {
837836
}
838837

839838
private static double calcMaxTimeRatio() {
840-
return max(2.0, min(5.0, 5 * 4.0 / max(Runtime.getRuntime().availableProcessors(), 1)));
839+
//return max(2.0, min(5.0, 5 * 4.0 / max(Runtime.getRuntime().availableProcessors(), 1)));
840+
return 5.0;
841841
}
842842

843843
private static void initBackupProperty(Config config) {
@@ -849,7 +849,7 @@ private static void initBackupProperty(Config config) {
849849
? config.getStringList("node.backup.members") : new ArrayList<>();
850850
}
851851

852-
private static void logConfig(){
852+
private static void logConfig() {
853853
Args args = getInstance();
854854
logger.info("\n");
855855
logger.info("************************ Net config ************************");

0 commit comments

Comments
 (0)