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
|
2014-05-02 14:35:03 +03:00
|
|
|
var StartRpc bool
|
2014-05-13 13:00:48 +03:00
|
|
|
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
|
2014-03-27 12:14:04 +02:00
|
|
|
var AssetPath string
|
2014-02-08 23:07:17 +02:00
|
|
|
|
|
|
|
func Init() {
|
2014-05-30 17:56:56 +03:00
|
|
|
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")
|
2014-05-30 17:56:56 +03: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 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.Parse()
|
|
|
|
}
|