go-ethereum/ethereal/config.go

44 lines
1.3 KiB
Go
Raw Normal View History

2014-02-08 23:07:17 +02:00
package main
import (
"flag"
)
2014-05-22 11:38:37 +03:00
var Identifier string
2014-05-30 14:28:31 +03:00
//var StartMining bool
var StartRpc bool
var RpcPort int
2014-02-08 23:07:17 +02:00
var UseUPnP bool
var OutboundPort string
var ShowGenesis bool
var AddPeer string
var MaxPeer int
var GenAddr bool
2014-02-11 19:46:10 +02:00
var UseSeed bool
2014-02-18 13:09:26 +02:00
var ImportKey string
var ExportKey bool
var AssetPath string
2014-02-08 23:07:17 +02:00
var Datadir string
2014-02-08 23:07:17 +02:00
func Init() {
flag.StringVar(&Identifier, "id", "", "Custom client identifier")
flag.StringVar(&OutboundPort, "port", "30303", "listening port")
2014-02-08 23:07:17 +02:00
flag.BoolVar(&UseUPnP, "upnp", false, "enable UPnP support")
flag.IntVar(&MaxPeer, "maxpeer", 10, "maximum desired peers")
flag.IntVar(&RpcPort, "rpcport", 8080, "port to start json-rpc server on")
flag.BoolVar(&StartRpc, "rpc", false, "start rpc server")
flag.StringVar(&AssetPath, "asset_path", "", "absolute path to GUI assets directory")
flag.BoolVar(&ShowGenesis, "genesis", false, "prints genesis header and exits")
2014-05-13 12:34:47 +03:00
flag.BoolVar(&UseSeed, "seed", true, "seed peers")
2014-02-08 23:07:17 +02:00
flag.BoolVar(&GenAddr, "genaddr", false, "create a new priv/pub key")
2014-02-18 13:09:26 +02:00
flag.BoolVar(&ExportKey, "export", false, "export private key")
flag.StringVar(&ImportKey, "import", "", "imports the given private key (hex)")
2014-02-08 23:07:17 +02:00
flag.StringVar(&Datadir, "datadir", ".ethereal", "specifies the datadir to use. Takes precedence over config file.")
2014-02-08 23:07:17 +02:00
flag.Parse()
}