Skip to content

Commit

Permalink
Modify configure file
Browse files Browse the repository at this point in the history
  • Loading branch information
wenweih committed Aug 12, 2018
1 parent 4bd0f35 commit ebf05b7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
4 changes: 2 additions & 2 deletions command.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ func Execute() {
func (conf *configure) InitConfig() {
viper.SetConfigType("yaml")
viper.AddConfigPath(HomeDir())
viper.SetConfigName("ethereum-service")
viper.SetConfigName("eth-cold-wallet")
viper.AutomaticEnv() // read in environment variables that match

// If a config file is found, read it in.
Expand All @@ -141,7 +141,7 @@ func (conf *configure) InitConfig() {
"Time:": time.Now().Format("Mon Jan _2 15:04:05 2006"),
}).Info()
} else {
log.Fatal("Error: ethereum-service.yml not found in: ", HomeDir())
log.Fatal("Error: eth-cold-wallet.yml not found in: ", HomeDir())
}

for key, value := range viper.AllSettings() {
Expand Down
8 changes: 3 additions & 5 deletions ethereum-service.yml.example → eth-cold-wallet.yml.example
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
# 文件目录规则:
# 比如 key_store_path: "aa/bb/cc" 表示 keystore 放在在当前用户目录下 ~/aa/bb/cc/keystore
elastic_url: "http://47.75.159.52:9200"
elastic_url: "http://host:port"
elastic_sniff: false
eth_rpc: "ws://127.0.0.1:8546"
geth_rpc: "ws://127.0.0.1:8546"
parity_rpc: "ws://47.75.159.52:8792"
parity_rpc: "ws://host:port"
etherscan_rpc:
key: "DUIG4H2MWH5QZ1W24NIHSXTIP9RA7KRMEA"
key: ""
url: "https://api.etherscan.io/api"
net_mode: "privatenet"
db_mysql: "root:hww8773084123@tcp(127.0.0.1:32768)/eth_service"
Expand Down

0 comments on commit ebf05b7

Please sign in to comment.