This commit is contained in:
Dave Collins 2013-09-17 17:04:40 -05:00
parent 68f30c7367
commit fc0cd75046
2 changed files with 9 additions and 9 deletions

View file

@ -110,7 +110,7 @@ func btcdMain() error {
loggers = setLogLevel(cfg.DebugLevel)
}
// See if we want to enable profiling
// See if we want to enable profiling.
if cfg.Profile != "" {
go func() {
log.Errorf("%v", http.ListenAndServe(

View file

@ -286,15 +286,15 @@ func loadConfig() (*config, []string, error) {
// Validate profile port number
if cfg.Profile != "" {
profilePort, err := strconv.Atoi(cfg.Profile)
if err != nil || profilePort < 1024 || profilePort > 65535 {
str := "%s: The profile port must be between 1024 and 65535"
err := errors.New(fmt.Sprintf(str, "loadConfig"))
fmt.Fprintln(os.Stderr, err)
parser.WriteHelp(os.Stderr)
return nil, nil, err
profilePort, err := strconv.Atoi(cfg.Profile)
if err != nil || profilePort < 1024 || profilePort > 65535 {
str := "%s: The profile port must be between 1024 and 65535"
err := errors.New(fmt.Sprintf(str, "loadConfig"))
fmt.Fprintln(os.Stderr, err)
parser.WriteHelp(os.Stderr)
return nil, nil, err
}
}
}
// Append the network type to the data directory so it is "namespaced"
// per network. In addition to the block database, there are other