|
|
|
@ -38,7 +38,7 @@ func main() { |
|
|
|
|
var ( |
|
|
|
|
listenAddr = flag.String("addr", ":30301", "listen address") |
|
|
|
|
genKey = flag.String("genkey", "", "generate a node key") |
|
|
|
|
writeAddr = flag.Bool("writeaddress", false, "write out the node's pubkey hash and quit") |
|
|
|
|
writeAddr = flag.Bool("writeaddress", false, "write out the node's public key and quit") |
|
|
|
|
nodeKeyFile = flag.String("nodekey", "", "private key filename") |
|
|
|
|
nodeKeyHex = flag.String("nodekeyhex", "", "private key as hex (for testing)") |
|
|
|
|
natdesc = flag.String("nat", "none", "port mapping mechanism (any|none|upnp|pmp|extip:<IP>)") |
|
|
|
@ -86,7 +86,7 @@ func main() { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if *writeAddr { |
|
|
|
|
fmt.Printf("%v\n", enode.PubkeyToIDV4(&nodeKey.PublicKey)) |
|
|
|
|
fmt.Printf("%x\n", crypto.FromECDSAPub(&nodeKey.PublicKey)[1:]) |
|
|
|
|
os.Exit(0) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|