aboutsummaryrefslogtreecommitdiffstats
path: root/ethereum
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-05-22 16:38:37 +0800
committerobscuren <geffobscura@gmail.com>2014-05-22 16:38:37 +0800
commit5f8911f7cba2cf837d891735f46b02b34e4fc228 (patch)
tree25d838b09733129a93810016ba3b9aa842958e87 /ethereum
parent01b833146f3afa214586a1ffb710546a5e4cc90a (diff)
downloaddexon-5f8911f7cba2cf837d891735f46b02b34e4fc228.tar.gz
dexon-5f8911f7cba2cf837d891735f46b02b34e4fc228.tar.zst
dexon-5f8911f7cba2cf837d891735f46b02b34e4fc228.zip
Custom identifier
Diffstat (limited to 'ethereum')
-rw-r--r--ethereum/config.go2
-rw-r--r--ethereum/ethereum.go7
2 files changed, 7 insertions, 2 deletions
diff --git a/ethereum/config.go b/ethereum/config.go
index f25f2fb66..f39f3b7da 100644
--- a/ethereum/config.go
+++ b/ethereum/config.go
@@ -6,6 +6,7 @@ import (
"os"
)
+var Identifier string
var StartMining bool
var StartRpc bool
var RpcPort int
@@ -30,6 +31,7 @@ func Init() {
flag.PrintDefaults()
}
+ flag.StringVar(&Identifier, "i", "", "Custom client identifier")
flag.BoolVar(&StartMining, "m", false, "start dagger mining")
flag.BoolVar(&ShowGenesis, "g", false, "prints genesis header and exits")
flag.BoolVar(&StartRpc, "r", false, "start rpc server")
diff --git a/ethereum/ethereum.go b/ethereum/ethereum.go
index 2fdfd5caf..34bacb7b9 100644
--- a/ethereum/ethereum.go
+++ b/ethereum/ethereum.go
@@ -52,12 +52,15 @@ func main() {
var logSys *log.Logger
flags := log.LstdFlags
+ var lt ethutil.LoggerType
if StartJsConsole || len(InputFile) > 0 {
- ethutil.ReadConfig(DataDir, ethutil.LogFile)
+ lt = ethutil.LogFile
} else {
- ethutil.ReadConfig(DataDir, ethutil.LogFile|ethutil.LogStd)
+ lt = ethutil.LogFile | ethutil.LogStd
}
+ ethutil.ReadConfig(DataDir, lt, Identifier)
+
logger := ethutil.Config.Log
if LogFile != "" {