2014-02-08 15:07:17 -06:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"flag"
|
|
|
|
)
|
|
|
|
|
2014-05-22 03:38:37 -05:00
|
|
|
var Identifier string
|
2014-05-30 06:28:31 -05:00
|
|
|
|
|
|
|
//var StartMining bool
|
2014-05-02 06:35:03 -05:00
|
|
|
var StartRpc bool
|
2014-05-13 05:00:48 -05:00
|
|
|
var RpcPort int
|
2014-02-08 15:07:17 -06:00
|
|
|
var UseUPnP bool
|
|
|
|
var OutboundPort string
|
|
|
|
var ShowGenesis bool
|
|
|
|
var AddPeer string
|
|
|
|
var MaxPeer int
|
|
|
|
var GenAddr bool
|
2014-02-11 11:46:10 -06:00
|
|
|
var UseSeed bool
|
2014-02-18 05:09:26 -06:00
|
|
|
var ImportKey string
|
|
|
|
var ExportKey bool
|
2014-03-27 05:14:04 -05:00
|
|
|
var AssetPath string
|
2014-02-08 15:07:17 -06:00
|
|
|
|
2014-06-11 05:33:11 -05:00
|
|
|
var Datadir string
|
|
|
|
|
2014-02-08 15:07:17 -06:00
|
|
|
func Init() {
|
2014-05-30 09:56:56 -05:00
|
|
|
flag.StringVar(&Identifier, "id", "", "Custom client identifier")
|
|
|
|
flag.StringVar(&OutboundPort, "port", "30303", "listening port")
|
2014-02-08 15:07:17 -06:00
|
|
|
flag.BoolVar(&UseUPnP, "upnp", false, "enable UPnP support")
|
2014-05-30 09:56:56 -05:00
|
|
|
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 04:34:47 -05:00
|
|
|
flag.BoolVar(&UseSeed, "seed", true, "seed peers")
|
2014-02-08 15:07:17 -06:00
|
|
|
flag.BoolVar(&GenAddr, "genaddr", false, "create a new priv/pub key")
|
2014-02-18 05:09:26 -06:00
|
|
|
flag.BoolVar(&ExportKey, "export", false, "export private key")
|
|
|
|
flag.StringVar(&ImportKey, "import", "", "imports the given private key (hex)")
|
2014-02-08 15:07:17 -06:00
|
|
|
|
2014-06-11 05:33:11 -05:00
|
|
|
flag.StringVar(&Datadir, "datadir", ".ethereal", "specifies the datadir to use. Takes precedence over config file.")
|
|
|
|
|
2014-02-08 15:07:17 -06:00
|
|
|
flag.Parse()
|
|
|
|
}
|