|
|
|
@ -69,7 +69,6 @@ var ( |
|
|
|
|
freshDB = flag.Bool("fresh_db", false, "true means the existing disk based db will be removed") |
|
|
|
|
pprof = flag.String("pprof", "", "what address and port the pprof profiling server should listen on") |
|
|
|
|
versionFlag = flag.Bool("version", false, "Output version info") |
|
|
|
|
onlyLogTps = flag.Bool("only_log_tps", false, "Only log TPS if true") |
|
|
|
|
dnsZone = flag.String("dns_zone", "", "if given and not empty, use peers from the zone (default: use libp2p peer discovery instead)") |
|
|
|
|
dnsFlag = flag.Bool("dns", true, "[deprecated] equivalent to -dns_zone t.hmny.io") |
|
|
|
|
dnsPort = flag.String("dns_port", "9000", "port of dns node") |
|
|
|
@ -140,11 +139,6 @@ func initSetup() { |
|
|
|
|
utils.SetLogVerbosity(log.Lvl(*verbosity)) |
|
|
|
|
utils.AddLogFile(fmt.Sprintf("%v/validator-%v-%v.log", *logFolder, *ip, *port), *logMaxSize) |
|
|
|
|
|
|
|
|
|
if *onlyLogTps { |
|
|
|
|
matchFilterHandler := log.MatchFilterHandler("msg", "TPS Report", utils.GetLogInstance().GetHandler()) |
|
|
|
|
utils.GetLogInstance().SetHandler(matchFilterHandler) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// Add GOMAXPROCS to achieve max performance.
|
|
|
|
|
runtime.GOMAXPROCS(runtime.NumCPU() * 4) |
|
|
|
|
|
|
|
|
@ -577,7 +571,6 @@ func setupViperConfig() { |
|
|
|
|
viperconfig.ResetConfBool(freshDB, envViper, configFileViper, "", "fresh_db") |
|
|
|
|
viperconfig.ResetConfString(pprof, envViper, configFileViper, "", "pprof") |
|
|
|
|
viperconfig.ResetConfBool(versionFlag, envViper, configFileViper, "", "version") |
|
|
|
|
viperconfig.ResetConfBool(onlyLogTps, envViper, configFileViper, "", "only_log_tps") |
|
|
|
|
viperconfig.ResetConfString(dnsZone, envViper, configFileViper, "", "dns_zone") |
|
|
|
|
viperconfig.ResetConfBool(dnsFlag, envViper, configFileViper, "", "dns") |
|
|
|
|
viperconfig.ResetConfInt(minPeers, envViper, configFileViper, "", "min_peers") |
|
|
|
|