diff options
author | Taylor Gerring <taylor.gerring@gmail.com> | 2015-03-02 21:06:08 +0800 |
---|---|---|
committer | Taylor Gerring <taylor.gerring@gmail.com> | 2015-03-02 21:06:08 +0800 |
commit | 4cb0bfe9395f3a45fcea00bc753cbd2c20ca78e8 (patch) | |
tree | 1cc4369855586a5b59406d09299e89f8e3f9142d /cmd/ethereum/flags.go | |
parent | cfe037028081ebb84ee35caa5b16fed5d125b58a (diff) | |
parent | 65cad14f9b27db396d036f47814d4843d947ac43 (diff) | |
download | dexon-4cb0bfe9395f3a45fcea00bc753cbd2c20ca78e8.tar dexon-4cb0bfe9395f3a45fcea00bc753cbd2c20ca78e8.tar.gz dexon-4cb0bfe9395f3a45fcea00bc753cbd2c20ca78e8.tar.bz2 dexon-4cb0bfe9395f3a45fcea00bc753cbd2c20ca78e8.tar.lz dexon-4cb0bfe9395f3a45fcea00bc753cbd2c20ca78e8.tar.xz dexon-4cb0bfe9395f3a45fcea00bc753cbd2c20ca78e8.tar.zst dexon-4cb0bfe9395f3a45fcea00bc753cbd2c20ca78e8.zip |
Merge branch 'develop' of github.com:ethereum/go-ethereum into removews
Conflicts:
cmd/ethereum/flags.go
cmd/mist/flags.go
Diffstat (limited to 'cmd/ethereum/flags.go')
-rw-r--r-- | cmd/ethereum/flags.go | 77 |
1 files changed, 44 insertions, 33 deletions
diff --git a/cmd/ethereum/flags.go b/cmd/ethereum/flags.go index fd8aee90b..46a63d849 100644 --- a/cmd/ethereum/flags.go +++ b/cmd/ethereum/flags.go @@ -27,6 +27,7 @@ import ( "log" "os" "path" + "runtime" "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/ethutil" @@ -36,39 +37,41 @@ import ( ) var ( - Identifier string - KeyRing string - DiffTool bool - DiffType string - KeyStore string - StartRpc bool - StartWebSockets bool - RpcPort int - OutboundPort string - ShowGenesis bool - AddPeer string - MaxPeer int - GenAddr bool - BootNodes string - NodeKey *ecdsa.PrivateKey - NAT nat.Interface - SecretFile string - ExportDir string - NonInteractive bool - Datadir string - LogFile string - ConfigFile string - DebugFile string - LogLevel int - LogFormat string - Dump bool - DumpHash string - DumpNumber int - VmType int - ImportChain string - SHH bool - Dial bool - PrintVersion bool + Identifier string + KeyRing string + DiffTool bool + DiffType string + KeyStore string + StartRpc bool + StartWebSockets bool + RpcListenAddress string + RpcPort int + OutboundPort string + ShowGenesis bool + AddPeer string + MaxPeer int + GenAddr bool + BootNodes string + NodeKey *ecdsa.PrivateKey + NAT nat.Interface + SecretFile string + ExportDir string + NonInteractive bool + Datadir string + LogFile string + ConfigFile string + DebugFile string + LogLevel int + LogFormat string + Dump bool + DumpHash string + DumpNumber int + VmType int + ImportChain string + SHH bool + Dial bool + PrintVersion bool + MinerThreads int ) // flags specific to cli client @@ -92,6 +95,7 @@ func Init() { flag.StringVar(&KeyRing, "keyring", "", "identifier for keyring to use") flag.StringVar(&KeyStore, "keystore", "db", "system to store keyrings: db|file (db)") + flag.StringVar(&RpcListenAddress, "rpcaddr", "127.0.0.1", "address for json-rpc server to listen on") flag.IntVar(&RpcPort, "rpcport", 8545, "port to start json-rpc server on") flag.BoolVar(&StartRpc, "rpc", false, "start rpc server") flag.BoolVar(&NonInteractive, "y", false, "non-interactive mode (say yes to confirmations)") @@ -116,6 +120,7 @@ func Init() { flag.BoolVar(&StartMining, "mine", false, "start dagger mining") flag.BoolVar(&StartJsConsole, "js", false, "launches javascript console") flag.BoolVar(&PrintVersion, "version", false, "prints version number") + flag.IntVar(&MinerThreads, "minerthreads", runtime.NumCPU(), "number of miner threads") // Network stuff var ( @@ -132,6 +137,12 @@ func Init() { flag.Parse() + // When the javascript console is started log to a file instead + // of stdout + if StartJsConsole { + LogFile = path.Join(Datadir, "ethereum.log") + } + var err error if NAT, err = nat.Parse(*natstr); err != nil { log.Fatalf("-nat: %v", err) |