mirror of https://github.com/status-im/op-geth.git
UPnP support
This commit is contained in:
parent
928a1303f6
commit
cce842314f
|
@ -19,10 +19,14 @@ const Debug = true
|
||||||
|
|
||||||
var StartConsole bool
|
var StartConsole bool
|
||||||
var StartMining bool
|
var StartMining bool
|
||||||
|
var UseUPnP bool
|
||||||
|
var OutboundPort string
|
||||||
|
|
||||||
func Init() {
|
func Init() {
|
||||||
flag.BoolVar(&StartConsole, "c", false, "debug and testing console")
|
flag.BoolVar(&StartConsole, "c", false, "debug and testing console")
|
||||||
flag.BoolVar(&StartMining, "m", false, "start dagger mining")
|
flag.BoolVar(&StartMining, "m", false, "start dagger mining")
|
||||||
|
flag.BoolVar(&UseUPnP, "upnp", false, "enable UPnP support")
|
||||||
|
flag.StringVar(&OutboundPort, "port", "30303", "listening port")
|
||||||
|
|
||||||
flag.Parse()
|
flag.Parse()
|
||||||
}
|
}
|
||||||
|
@ -52,7 +56,7 @@ func main() {
|
||||||
log.Printf("Starting Ethereum v%s\n", ethutil.Config.Ver)
|
log.Printf("Starting Ethereum v%s\n", ethutil.Config.Ver)
|
||||||
|
|
||||||
// Instantiated a eth stack
|
// Instantiated a eth stack
|
||||||
ethereum, err := eth.New(eth.CapDefault)
|
ethereum, err := eth.New(eth.CapDefault, UseUPnP)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Println(err)
|
log.Println(err)
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in New Issue