diff options
author | zelig <viktor.tron@gmail.com> | 2014-12-15 03:55:52 +0800 |
---|---|---|
committer | zelig <viktor.tron@gmail.com> | 2014-12-15 04:52:28 +0800 |
commit | 61940b2275a8f3c77d906947b2d1126bb6c3b21d (patch) | |
tree | 93396df91edf9bf3d6ab1e8de91abf92c1a79859 /cmd/utils/cmd.go | |
parent | e77b720ead2e8f91f6f98664a66953c3826269c6 (diff) | |
download | go-tangerine-61940b2275a8f3c77d906947b2d1126bb6c3b21d.tar.gz go-tangerine-61940b2275a8f3c77d906947b2d1126bb6c3b21d.tar.zst go-tangerine-61940b2275a8f3c77d906947b2d1126bb6c3b21d.zip |
adapt cmd/cli to new backend
- new flag nat for nat support UPNP|PMP
- new flag pmp for PMP gateway IP
- add NatType to utils/cmd to get p2p.NAT from nat type string
- obsolete usepnp flag
- get rid of IsUpToDate and sleep in miner start
- ethereum constructor takes nat type, port, maxpeer
- add pubkey arg to client identity
Diffstat (limited to 'cmd/utils/cmd.go')
-rw-r--r-- | cmd/utils/cmd.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/cmd/utils/cmd.go b/cmd/utils/cmd.go index 24d5970bd..867ef5e37 100644 --- a/cmd/utils/cmd.go +++ b/cmd/utils/cmd.go @@ -154,13 +154,22 @@ func NatType(natType string, gateway string) (nat p2p.NAT) { nat = p2p.UPNP() case "PMP": ip := net.ParseIP(gateway) +<<<<<<< HEAD if ip != nil { clilogger.Fatalf("bad PMP gateway '%s'", gateway) +======= + if ip == nil { + clilogger.Fatalln("cannot resolve PMP gateway IP %s", gateway) +>>>>>>> adapt cmd/cli to new backend } nat = p2p.PMP(ip) case "": default: +<<<<<<< HEAD clilogger.Fatalf("unrecognised NAT type '%s'", natType) +======= + clilogger.Fatalln("unrecognised NAT type %s", natType) +>>>>>>> adapt cmd/cli to new backend } return } |