aboutsummaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
authorFelix Lange <fjl@users.noreply.github.com>2018-10-19 21:41:27 +0800
committerPéter Szilágyi <peterke@gmail.com>2018-10-19 21:41:27 +0800
commit75060ef96ec38b0c6ca4dba4f4543e594025507f (patch)
tree0e45c2be2cf6a4e24849115ca66ce99341856f8f /cmd
parent6ff97bf2e5623d3f6eb09e2630c3fdbd770acf0b (diff)
downloaddexon-75060ef96ec38b0c6ca4dba4f4543e594025507f.tar
dexon-75060ef96ec38b0c6ca4dba4f4543e594025507f.tar.gz
dexon-75060ef96ec38b0c6ca4dba4f4543e594025507f.tar.bz2
dexon-75060ef96ec38b0c6ca4dba4f4543e594025507f.tar.lz
dexon-75060ef96ec38b0c6ca4dba4f4543e594025507f.tar.xz
dexon-75060ef96ec38b0c6ca4dba4f4543e594025507f.tar.zst
dexon-75060ef96ec38b0c6ca4dba4f4543e594025507f.zip
cmd/bootnode: fix -writeaddress output (#17932)
Diffstat (limited to 'cmd')
-rw-r--r--cmd/bootnode/main.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/cmd/bootnode/main.go b/cmd/bootnode/main.go
index 346523ddb..32f7d63be 100644
--- a/cmd/bootnode/main.go
+++ b/cmd/bootnode/main.go
@@ -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)
}