go-ethereum/ethereal/config.go

44 lines
1.3 KiB
Go
Raw Normal View History

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
var StartRpc bool
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
var AssetPath string
2014-02-08 15:07:17 -06:00
var Datadir string
2014-02-08 15:07:17 -06:00
func Init() {
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")
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
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()
}