Fix double printing the mainnet has not launched yet message (#1101)

This commit is contained in:
Elichai Turkel 2020-11-18 09:16:58 +02:00 committed by GitHub
parent 184911f76e
commit 5b037950d8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 5 deletions

View File

@ -46,7 +46,7 @@ func StartApp() error {
// initializes logging and configures it accordingly.
cfg, err := config.LoadConfig()
if err != nil {
fmt.Fprint(os.Stderr, err)
fmt.Fprintln(os.Stderr, err)
return err
}
defer panics.HandlePanic(log, "MAIN", nil)

View File

@ -48,10 +48,7 @@ func (networkFlags *NetworkFlags) ResolveNetwork(parser *flags.Parser) error {
}
if numNets == 0 {
message := "Mainnet has not launched yet, use --testnet to run in testnet mode"
err := errors.Errorf(message)
fmt.Fprintln(os.Stderr, err)
return err
return errors.Errorf("Mainnet has not launched yet, use --testnet to run in testnet mode")
}
return nil