First conf.file commit

This commit is contained in:
Said Syakin 2018-01-29 01:47:03 +04:00
parent 4bb3c89d44
commit 9e7ee2c892

View file

@ -123,6 +123,13 @@ func makeConfigNode(ctx *cli.Context) (*node.Node, gethConfig) {
if err := loadConfig(file, &cfg); err != nil { if err := loadConfig(file, &cfg); err != nil {
utils.Fatalf("%v", err) utils.Fatalf("%v", err)
} }
} else {
// Load config file from default place.
if err := loadConfig("./geth_conf.toml", &cfg); err != nil {
if ctx.Command.Name != "dumpconfig" {
utils.Fatalf("Config not found: %v. Put config file here or set config path with flag --config /path/to/your_config.toml", err)
}
}
} }
// Apply flags. // Apply flags.