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